[Libreoffice-commits] .: codemaker/Module_codemaker.mk rdbmaker/Module_rdbmaker.mk unodevtools/Module_unodevtools.mk

2012-04-20 Thread Tor Lillqvist
 codemaker/Module_codemaker.mk |4 
 rdbmaker/Module_rdbmaker.mk   |4 
 unodevtools/Module_unodevtools.mk |4 
 3 files changed, 12 insertions(+)

New commits:
commit cf0186de2df4ad2ffeb39088638aefafc5d4a823
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Fri Apr 20 10:15:04 2012 +0300

Don't build these command-line tools for non-desktop OSes

diff --git a/codemaker/Module_codemaker.mk b/codemaker/Module_codemaker.mk
index d2b6060..9a67e39 100644
--- a/codemaker/Module_codemaker.mk
+++ b/codemaker/Module_codemaker.mk
@@ -26,6 +26,8 @@
 
 $(eval $(call gb_Module_Module,codemaker))
 
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+
 $(eval $(call gb_Module_add_targets,codemaker,\
 Package_inc \
 StaticLibrary_codemaker \
@@ -35,4 +37,6 @@ $(eval $(call gb_Module_add_targets,codemaker,\
 Executable_cppumaker \
 ))
 
+endif
+
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/rdbmaker/Module_rdbmaker.mk b/rdbmaker/Module_rdbmaker.mk
index 0145b23..c5683e0 100644
--- a/rdbmaker/Module_rdbmaker.mk
+++ b/rdbmaker/Module_rdbmaker.mk
@@ -26,8 +26,12 @@
 
 $(eval $(call gb_Module_Module,rdbmaker))
 
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+
 $(eval $(call gb_Module_add_targets,rdbmaker,\
Executable_rdbmaker \
 ))
 
+endif
+
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/unodevtools/Module_unodevtools.mk 
b/unodevtools/Module_unodevtools.mk
index 9819bfd..09ca03a 100644
--- a/unodevtools/Module_unodevtools.mk
+++ b/unodevtools/Module_unodevtools.mk
@@ -26,8 +26,12 @@
 
 $(eval $(call gb_Module_Module,unodevtools))
 
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+
 $(eval $(call gb_Module_add_targets,unodevtools,\
Executable_skeletonmaker \
 ))
 
+endif
+
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: unotools/source

2012-04-20 Thread Stephan Bergmann
 unotools/source/config/historyoptions.cxx |   38 ++
 1 file changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 4ccb4bda483eb548eb6efb5e2f1952f094522320
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 20 09:21:42 2012 +0200

fdo#46074 Ignore corrupted items in Recent Documents

diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index 2045074..8ee53cc 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -33,6 +33,7 @@
 #include com/sun/star/uno/Any.hxx
 #include com/sun/star/uno/Sequence.hxx
 
+#include cassert
 #include deque
 #include algorithm
 
@@ -391,20 +392,37 @@ Sequence Sequence PropertyValue   
SvtHistoryOptions_Impl::GetList( EHistoryT
 
 const sal_Int32 nLength = 
xOrderList-getElementNames().getLength();
 Sequence Sequence PropertyValue   aRet(nLength);
+sal_Int32 nCount = 0;
 
 for(sal_Int32 nItem=0; nItemnLength; ++nItem)
 {
-::rtl::OUString sUrl;
-xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
-xSet-getPropertyValue(rtl::OUString(s_sHistoryItemRef)) = 
sUrl;
-
-xItemList-getByName(sUrl) = xSet;
-seqProperties[s_nOffsetURL  ].Value = sUrl;
-xSet-getPropertyValue(rtl::OUString(s_sFilter))   = 
seqProperties[s_nOffsetFilter   ].Value;
-xSet-getPropertyValue(rtl::OUString(s_sTitle))= 
seqProperties[s_nOffsetTitle].Value;
-xSet-getPropertyValue(rtl::OUString(s_sPassword)) = 
seqProperties[s_nOffsetPassword ].Value;
-aRet[nItem] = seqProperties;
+try
+{
+::rtl::OUString sUrl;
+xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
+xSet-getPropertyValue(rtl::OUString(s_sHistoryItemRef)) 
= sUrl;
+
+xItemList-getByName(sUrl) = xSet;
+seqProperties[s_nOffsetURL  ].Value = sUrl;
+xSet-getPropertyValue(rtl::OUString(s_sFilter))   = 
seqProperties[s_nOffsetFilter   ].Value;
+xSet-getPropertyValue(rtl::OUString(s_sTitle))= 
seqProperties[s_nOffsetTitle].Value;
+xSet-getPropertyValue(rtl::OUString(s_sPassword)) = 
seqProperties[s_nOffsetPassword ].Value;
+aRet[nCount++] = seqProperties;
+}
+catch(const css::uno::Exception ex)
+{
+// https://bugs.freedesktop.org/show_bug.cgi?id=46074
+// FILEOPEN: No Recent Documents... discusses a problem
+// with corrupted 
/org.openoffice.Office/Histories/Histories
+// configuration items; to work around that problem, simply
+// ignore such corrupted individual items here, so that at
+// least newly added items are successfully reported back
+// from this function:
+LogHelper::logIt(ex);
+}
 }
+assert(nCount = nLength);
+aRet.realloc(nCount);
 seqReturn = aRet;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sw/source

2012-04-20 Thread Miklos Vajna
 sw/source/core/crsr/callnk.cxx |   63 ++---
 1 file changed, 34 insertions(+), 29 deletions(-)

New commits:
commit e4509eea8fc7c07ddff48edf0d4c015c2663d896
Author: Miklos Vajna vmik...@suse.cz
Date:   Fri Apr 20 09:45:24 2012 +0200

n#751313 SwCallLink: avoid redrawing complete rows without nested tables

diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 642b3ea..79aac33 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -100,8 +100,21 @@ void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell 
rShell)
 if ( pRow )
 {
 const SwTableLine* pLine = pRow-GetTabLine( );
-SwFmtFrmSize pSize = pLine-GetFrmFmt( )-GetFrmSize( );
-pRow-ModifyNotification( NULL, pSize );
+// Avoid redrawing the complete row if there are no nested 
tables
+bool bHasTable = false;
+SwFrm *pCell = pRow-GetLower();
+for (; pCell  !bHasTable; pCell = pCell-GetNext())
+{
+SwFrm *pContent = pCell-GetLower();
+for (; pContent  !bHasTable; pContent = 
pContent-GetNext())
+if (pContent-GetType() == FRM_TAB)
+bHasTable = true;
+}
+if (bHasTable)
+{
+SwFmtFrmSize pSize = pLine-GetFrmFmt()-GetFrmSize();
+pRow-ModifyNotification(NULL, pSize);
+}
 }
 }
 }
commit 071c4d56517c43d3160c4c529abc534851066060
Author: Miklos Vajna vmik...@suse.cz
Date:   Thu Apr 19 16:20:46 2012 +0200

n#751313 SwCallLink: avoid copypaste via introducing lcl_notifyRow

diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index a6373da..642b3ea 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -87,6 +87,25 @@ SwCallLink::SwCallLink( SwCrsrShell  rSh )
 }
 }
 
+void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell rShell)
+{
+if ( pNode != NULL )
+{
+SwFrm *myFrm = pNode-getLayoutFrm( rShell.GetLayout() );
+if (myFrm!=NULL)
+{
+// We need to emulated a change of the row height in order
+// to have the complete row redrawn
+SwRowFrm* pRow = myFrm-FindRowFrm();
+if ( pRow )
+{
+const SwTableLine* pLine = pRow-GetTabLine( );
+SwFmtFrmSize pSize = pLine-GetFrmFmt( )-GetFrmSize( );
+pRow-ModifyNotification( NULL, pSize );
+}
+}
+}
+}
 
 SwCallLink::~SwCallLink()
 {
@@ -100,19 +119,7 @@ SwCallLink::~SwCallLink()
 if( !pCNd )
 return;
 
-SwFrm *myFrm = pCNd-getLayoutFrm( rShell.GetLayout() );
-if (myFrm!=NULL)
-{
-// We need to emulated a change of the row height in order
-// to have the complete row redrawn
-SwRowFrm* pRow = myFrm-FindRowFrm( );
-if ( pRow )
-{
-const SwTableLine* pLine = pRow-GetTabLine( );
-SwFmtFrmSize pSize = pLine-GetFrmFmt( )-GetFrmSize( );
-pRow-ModifyNotification( NULL, pSize );
-}
-}
+lcl_notifyRow(pCNd, rShell);
 
 const SwDoc *pDoc=rShell.GetDoc();
 const SwCntntNode *pNode = NULL;
@@ -120,22 +127,7 @@ SwCallLink::~SwCallLink()
 {
 pNode = pDoc-GetNodes()[nNode]-GetCntntNode();
 }
-if ( pNode != NULL )
-{
-SwFrm *myFrm2 = pNode-getLayoutFrm( rShell.GetLayout() );
-if (myFrm2!=NULL)
-{
-// We need to emulated a change of the row height in order
-// to have the complete row redrawn
-SwRowFrm* pRow = myFrm2-FindRowFrm();
-if ( pRow )
-{
-const SwTableLine* pLine = pRow-GetTabLine( );
-SwFmtFrmSize pSize = pLine-GetFrmFmt( )-GetFrmSize( );
-pRow-ModifyNotification( NULL, pSize );
-}
-}
-}
+lcl_notifyRow(pNode, rShell);
 
 xub_StrLen nCmp, nAktCntnt = pCurCrsr-GetPoint()-nContent.GetIndex();
 sal_uInt16 nNdWhich = pCNd-GetNodeType();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - unotools/source

2012-04-20 Thread Tor Lillqvist
 unotools/source/config/historyoptions.cxx |   38 ++
 1 file changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 488b766836ef41c51670175fc2eeff7c9640e86c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 20 09:21:42 2012 +0200

fdo#46074 Ignore corrupted items in Recent Documents

Signed-off-by: Tor Lillqvist tlillqv...@suse.com

diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index 73161be..5ba2045 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -35,6 +35,7 @@
 #include com/sun/star/uno/Any.hxx
 #include com/sun/star/uno/Sequence.hxx
 
+#include cassert
 #include deque
 #include algorithm
 
@@ -440,20 +441,37 @@ Sequence Sequence PropertyValue   
SvtHistoryOptions_Impl::GetList( EHistoryT
 
 const sal_Int32 nLength = 
xOrderList-getElementNames().getLength();
 Sequence Sequence PropertyValue   aRet(nLength);
+sal_Int32 nCount = 0;
 
 for(sal_Int32 nItem=0; nItemnLength; ++nItem)
 {
-::rtl::OUString sUrl;
-xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
-xSet-getPropertyValue(s_sHistoryItemRef) = sUrl;
-
-xItemList-getByName(sUrl) = xSet;
-seqProperties[s_nOffsetURL  ].Value = sUrl;
-xSet-getPropertyValue(s_sFilter)   = 
seqProperties[s_nOffsetFilter   ].Value;
-xSet-getPropertyValue(s_sTitle)= 
seqProperties[s_nOffsetTitle].Value;
-xSet-getPropertyValue(s_sPassword) = 
seqProperties[s_nOffsetPassword ].Value;
-aRet[nItem] = seqProperties;
+try
+{
+::rtl::OUString sUrl;
+xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
+xSet-getPropertyValue(s_sHistoryItemRef) = sUrl;
+
+xItemList-getByName(sUrl) = xSet;
+seqProperties[s_nOffsetURL  ].Value = sUrl;
+xSet-getPropertyValue(s_sFilter)   = 
seqProperties[s_nOffsetFilter   ].Value;
+xSet-getPropertyValue(s_sTitle)= 
seqProperties[s_nOffsetTitle].Value;
+xSet-getPropertyValue(s_sPassword) = 
seqProperties[s_nOffsetPassword ].Value;
+aRet[nCount++] = seqProperties;
+}
+catch(const css::uno::Exception ex)
+{
+// https://bugs.freedesktop.org/show_bug.cgi?id=46074
+// FILEOPEN: No Recent Documents... discusses a problem
+// with corrupted 
/org.openoffice.Office/Histories/Histories
+// configuration items; to work around that problem, simply
+// ignore such corrupted individual items here, so that at
+// least newly added items are successfully reported back
+// from this function:
+LogHelper::logIt(ex);
+}
 }
+assert(nCount = nLength);
+aRet.realloc(nCount);
 seqReturn = aRet;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: formula/source unusedcode.easy

2012-04-20 Thread Jesús Corrius
 formula/source/ui/dlg/ControlHelper.hxx |3 ---
 formula/source/ui/dlg/funcutl.cxx   |   19 ---
 unusedcode.easy |1 -
 3 files changed, 23 deletions(-)

New commits:
commit fe84f6dbab168e9bdc1459c446c4dff0afb17fdc
Author: Jaime Navarro jaime.nava...@alu.umh.es
Date:   Fri Apr 20 10:22:50 2012 +0200

Remove unused method ArgInput::GetArgSelection

diff --git a/formula/source/ui/dlg/ControlHelper.hxx 
b/formula/source/ui/dlg/ControlHelper.hxx
index b1aa636..56f04e9 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -163,9 +163,6 @@ public:
 voidSetArgSelection (const Selection rSel );
 voidReplaceSelOfArg (const String rStr );
 
-Selection   GetArgSelection();
-
-
 ArgEdit*GetArgEdPtr() {return pEdArg;}
 
 
diff --git a/formula/source/ui/dlg/funcutl.cxx 
b/formula/source/ui/dlg/funcutl.cxx
index 36115d0..5673304 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -343,25 +343,6 @@ void ArgInput::SetArgSelection  (const Selection rSel )
 if(pEdArg !=NULL) pEdArg -SetSelection(rSel );
 }
 
-/*
-#*  Member: SetArgSelection Date:13.01.97
-#*
-#*
-#*  Class:  ArgInput
-#*
-#*  Function:   Returns the Selection for the EditBox.
-#*
-#*  Input:  String
-#*
-#*  Output: ---
-#*
-#/
-Selection ArgInput::GetArgSelection ()
-{
-Selection   aSel;
-if(pEdArg !=NULL) aSel=pEdArg -GetSelection();
-return aSel;
-}
 
 /*
 #*  Member: SetArgVal   Date:13.01.97
diff --git a/unusedcode.easy b/unusedcode.easy
index cf1e982..ff33e91 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -718,7 +718,6 @@ 
drawinglayer::attribute::SdrFormTextAttribute::getFormTextShdwTransp() const
 drawinglayer::attribute::SdrTextAttribute::getPropertiesVersion() const
 drawinglayer::attribute::SdrTextAttribute::isWrongSpell() const
 
drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(basegfx::B2DPolyPolygon
 const, drawinglayer::attribute::LineAttribute const)
-formula::ArgInput::GetArgSelection()
 formula::EditBox::EditBox(Window*, long)
 formula::FormulaListBox::FormulaListBox(Window*, long)
 formula::FormulaTokenArray::AddBad(unsigned short const*)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-20 Thread Muthu Subramanian
 editeng/source/items/frmitems.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1489254311e75a379a129bceeab49643ebea04e0
Author: Dezsi Szabolcs dezsisz...@hotmail.com
Date:   Fri Apr 20 14:10:56 2012 +0530

fdo#47436: Fixed crash while opening odt file.

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index efdcadb..d4b876b 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1951,7 +1951,8 @@ bool SvxBoxItem::PutValue( const uno::Any rVal, 
sal_uInt8 nMemberId )
 for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n)
 {
 editeng::SvxBorderLine* pLine = const_cast 
editeng::SvxBorderLine* ( GetLine( aBorders[n] ) );
-pLine-SetStyle( eBorderStyle );
+if( pLine )
+pLine-SetStyle( eBorderStyle );
 }
 return sal_True;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5-3' - unotools/source

2012-04-20 Thread Michael Stahl
 unotools/source/config/historyoptions.cxx |   38 ++
 1 file changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 76abd1abea8b23e843104756f3942c94e5e81d64
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 20 09:21:42 2012 +0200

fdo#46074 Ignore corrupted items in Recent Documents

Signed-off-by: Tor Lillqvist tlillqv...@suse.com
(cherry picked from commit 488b766836ef41c51670175fc2eeff7c9640e86c)

Signed-off-by: Noel Power noel.po...@novell.com
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index 73161be..5ba2045 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -35,6 +35,7 @@
 #include com/sun/star/uno/Any.hxx
 #include com/sun/star/uno/Sequence.hxx
 
+#include cassert
 #include deque
 #include algorithm
 
@@ -440,20 +441,37 @@ Sequence Sequence PropertyValue   
SvtHistoryOptions_Impl::GetList( EHistoryT
 
 const sal_Int32 nLength = 
xOrderList-getElementNames().getLength();
 Sequence Sequence PropertyValue   aRet(nLength);
+sal_Int32 nCount = 0;
 
 for(sal_Int32 nItem=0; nItemnLength; ++nItem)
 {
-::rtl::OUString sUrl;
-xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
-xSet-getPropertyValue(s_sHistoryItemRef) = sUrl;
-
-xItemList-getByName(sUrl) = xSet;
-seqProperties[s_nOffsetURL  ].Value = sUrl;
-xSet-getPropertyValue(s_sFilter)   = 
seqProperties[s_nOffsetFilter   ].Value;
-xSet-getPropertyValue(s_sTitle)= 
seqProperties[s_nOffsetTitle].Value;
-xSet-getPropertyValue(s_sPassword) = 
seqProperties[s_nOffsetPassword ].Value;
-aRet[nItem] = seqProperties;
+try
+{
+::rtl::OUString sUrl;
+xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
+xSet-getPropertyValue(s_sHistoryItemRef) = sUrl;
+
+xItemList-getByName(sUrl) = xSet;
+seqProperties[s_nOffsetURL  ].Value = sUrl;
+xSet-getPropertyValue(s_sFilter)   = 
seqProperties[s_nOffsetFilter   ].Value;
+xSet-getPropertyValue(s_sTitle)= 
seqProperties[s_nOffsetTitle].Value;
+xSet-getPropertyValue(s_sPassword) = 
seqProperties[s_nOffsetPassword ].Value;
+aRet[nCount++] = seqProperties;
+}
+catch(const css::uno::Exception ex)
+{
+// https://bugs.freedesktop.org/show_bug.cgi?id=46074
+// FILEOPEN: No Recent Documents... discusses a problem
+// with corrupted 
/org.openoffice.Office/Histories/Histories
+// configuration items; to work around that problem, simply
+// ignore such corrupted individual items here, so that at
+// least newly added items are successfully reported back
+// from this function:
+LogHelper::logIt(ex);
+}
 }
+assert(nCount = nLength);
+aRet.realloc(nCount);
 seqReturn = aRet;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 8 commits - filter/source l10ntools/inc l10ntools/prj l10ntools/source linguistic/source svtools/source unusedcode.easy

2012-04-20 Thread Caolán McNamara
 filter/source/graphicfilter/itiff/ccidecom.cxx |   35 
 filter/source/graphicfilter/itiff/itiff.cxx|   17 +---
 l10ntools/inc/l10ntools/HelpIndexer.hxx|4 -
 l10ntools/inc/l10ntools/HelpSearch.hxx |6 --
 l10ntools/inc/l10ntools/LuceneHelper.hxx   |   53 +
 l10ntools/prj/d.lst|1 
 l10ntools/source/help/HelpIndexer.cxx  |2 
 l10ntools/source/help/HelpSearch.cxx   |1 
 l10ntools/source/help/LuceneHelper.cxx |2 
 l10ntools/source/help/LuceneHelper.hxx |   44 
 linguistic/source/hyphdsp.cxx  |4 -
 svtools/source/control/calendar.cxx|8 +--
 svtools/source/control/ruler.cxx   |3 -
 svtools/source/control/valueacc.cxx|9 ++--
 unusedcode.easy|   10 
 15 files changed, 99 insertions(+), 100 deletions(-)

New commits:
commit 1dcab66d5c2579c4637891859736b02745fdf8bb
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 20 11:54:28 2012 +0100

WaE: MSVC2008 suppress warnings in clucene headers

diff --git a/l10ntools/inc/l10ntools/LuceneHelper.hxx 
b/l10ntools/inc/l10ntools/LuceneHelper.hxx
new file mode 100644
index 000..c990647
--- /dev/null
+++ b/l10ntools/inc/l10ntools/LuceneHelper.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Gert van Valkenhoef g.h.m.van.valkenh...@rug.nl
+ *  (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the GPLv3+), or
+ * the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef LUCENEHELPER_HXX
+#define LUCENEHELPER_HXX
+
+#if defined _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4068 4263 4264 4266)
+#endif
+
+#include CLucene.h
+#include CLucene/analysis/LanguageBasedAnalyzer.h
+
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include rtl/ustring.hxx
+#include vector
+
+std::vectorTCHAR OUStringToTCHARVec(rtl::OUString const rStr);
+rtl::OUString TCHARArrayToOUString(TCHAR const *str);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 959ab4d0ca1a09dce08a298e41828c377a1474ff
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 20 11:54:01 2012 +0100

WaE: MSVC2008 suppress warnings in clucene headers

diff --git a/l10ntools/inc/l10ntools/HelpIndexer.hxx 
b/l10ntools/inc/l10ntools/HelpIndexer.hxx
index 28c7eb6..df492bb 100644
--- a/l10ntools/inc/l10ntools/HelpIndexer.hxx
+++ b/l10ntools/inc/l10ntools/HelpIndexer.hxx
@@ -31,9 +31,7 @@
 #define HELPINDEXER_HXX
 
 #include l10ntools/dllapi.h
-
-#include CLucene/StdHeader.h
-#include CLucene.h
+#include l10ntools/LuceneHelper.hxx
 
 #include rtl/ustring.hxx
 #include set
diff --git a/l10ntools/inc/l10ntools/HelpSearch.hxx 
b/l10ntools/inc/l10ntools/HelpSearch.hxx
index 63e2807..1a1b3c0 100644
--- a/l10ntools/inc/l10ntools/HelpSearch.hxx
+++ b/l10ntools/inc/l10ntools/HelpSearch.hxx
@@ -31,14 +31,12 @@
 #define HELPSEARCH_HXX
 
 #include l10ntools/dllapi.h
-
-#include CLucene/StdHeader.h
-#include CLucene.h
+#include l10ntools/LuceneHelper.hxx
 
 #include rtl/ustring.hxx
 #include vector
 
-class L10N_DLLPUBLIC HelpSearch {
+class L10N_DLLPUBLIC HelpSearch{
private:
rtl::OUString d_lang;
rtl::OString d_indexDir;
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index e9329dc..99aac56 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,6 +47,7 @@ mkdir: %_DEST%\bin\help\com\sun\star\help
 ..\inc\l10ntools\dllapi.h %_DEST%\inc\l10ntools\dllapi.h
 ..\inc\l10ntools\directory.hxx %_DEST%\inc\l10ntools\directory.hxx
 ..\inc\l10ntools\file.hxx %_DEST%\inc\l10ntools\file.hxx
+..\inc\l10ntools\LuceneHelper.hxx %_DEST%\inc\l10ntools\LuceneHelper.hxx
 ..\inc\l10ntools\HelpIndexer.hxx %_DEST%\inc\l10ntools\HelpIndexer.hxx
 ..\inc\l10ntools\HelpSearch.hxx %_DEST%\inc\l10ntools\HelpSearch.hxx
 ..\source\filter\merge\FCFGMerge.cfg  %_DEST%\inc\l10ntools\FCFGMerge.cfg

[Libreoffice-commits] .: 8 commits - offapi/com sw/source udkapi/com

2012-04-20 Thread Michael Stahl
 offapi/com/sun/star/datatransfer/clipboard/ClipboardEvent.idl |2 
 offapi/com/sun/star/datatransfer/clipboard/XClipboard.idl |4 -
 offapi/com/sun/star/datatransfer/clipboard/XClipboardOwner.idl|2 
 offapi/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.idl |2 
 offapi/com/sun/star/deployment/PackageInformationProvider.idl |4 -
 offapi/com/sun/star/deployment/XPackageInformationProvider.idl|4 -
 offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl|2 
 offapi/com/sun/star/report/meta/XFormulaParser.idl|2 
 offapi/com/sun/star/text/XSimpleText.idl  |2 
 offapi/com/sun/star/ucb/NumberedSortingInfo.idl   |2 
 offapi/com/sun/star/xml/dom/XAttr.idl |2 
 offapi/com/sun/star/xml/dom/XComment.idl  |2 
 offapi/com/sun/star/xml/xpath/Libxml2ExtensionHandle.idl  |4 -
 offapi/com/sun/star/xsd/WhiteSpaceTreatment.idl   |4 -
 sw/source/core/layout/paintfrm.cxx|   22 
++
 udkapi/com/sun/star/corba/corba.idl   |5 ++
 udkapi/com/sun/star/corba/giop/giop.idl   |   10 ++--
 udkapi/com/sun/star/corba/iiop/iiop.idl   |6 +-
 udkapi/com/sun/star/corba/iop/iop.idl |2 
 udkapi/com/sun/star/reflection/InvalidTypeNameException.idl   |2 
 udkapi/com/sun/star/util/logging/LoggerRemote.idl |4 -
 21 files changed, 51 insertions(+), 38 deletions(-)

New commits:
commit 85ef81f318cbec16fff67e49c9b902dfe16cb7b7
Author: Tomas Hlavaty t...@logand.com
Date:   Fri Apr 20 12:19:58 2012 +0200

idl fix symbol references

diff --git a/offapi/com/sun/star/datatransfer/clipboard/ClipboardEvent.idl 
b/offapi/com/sun/star/datatransfer/clipboard/ClipboardEvent.idl
index e6d81f7..4d116f4 100644
--- a/offapi/com/sun/star/datatransfer/clipboard/ClipboardEvent.idl
+++ b/offapi/com/sun/star/datatransfer/clipboard/ClipboardEvent.idl
@@ -47,7 +47,7 @@ published struct ClipboardEvent: 
com::sun::star::lang::EventObject
 //-
 /** The current content of the clipboard.
 */
-XTransferable Contents;
+com::sun::star::datatransfer::XTransferable Contents;
 };
 
 //=
diff --git a/offapi/com/sun/star/datatransfer/clipboard/XClipboard.idl 
b/offapi/com/sun/star/datatransfer/clipboard/XClipboard.idl
index 1b06c65..11c79b3 100644
--- a/offapi/com/sun/star/datatransfer/clipboard/XClipboard.idl
+++ b/offapi/com/sun/star/datatransfer/clipboard/XClipboard.idl
@@ -54,7 +54,7 @@ published interface XClipboard: 
com::sun::star::uno::XInterface
 
 @see com::sun::star::datatransfer::XTransferable
 */
-XTransferable getContents();
+com::sun::star::datatransfer::XTransferable getContents();
 
 //-
 /** Sets the current contents of the clipboard to the specified
@@ -76,7 +76,7 @@ published interface XClipboard: 
com::sun::star::uno::XInterface
 @see com::sun::star::datatransfer::XTransferable
 @see com::sun::star::datatransfer::clipboard::XClipboardOwner
 */
-[oneway] void setContents( [in] XTransferable xTrans, [in] XClipboardOwner 
xClipboardOwner );
+[oneway] void setContents( [in] 
com::sun::star::datatransfer::XTransferable xTrans, [in] XClipboardOwner 
xClipboardOwner );
 
 //-
 /** To get the name of the clipboard instance.
diff --git a/offapi/com/sun/star/datatransfer/clipboard/XClipboardOwner.idl 
b/offapi/com/sun/star/datatransfer/clipboard/XClipboardOwner.idl
index 6e81c20..66a5fe1 100644
--- a/offapi/com/sun/star/datatransfer/clipboard/XClipboardOwner.idl
+++ b/offapi/com/sun/star/datatransfer/clipboard/XClipboardOwner.idl
@@ -59,7 +59,7 @@ published interface XClipboardOwner: 
com::sun::star::uno::XInterface
 @see com::sun::star::datatransfer::clipboard::XClipboard
 @see com::sun::star::datatransfer::XTransferable
 */
-[oneway] void lostOwnership( [in] XClipboard xClipboard, [in] 
XTransferable xTrans );
+[oneway] void lostOwnership( [in] XClipboard xClipboard, [in] 
com::sun::star::datatransfer::XTransferable xTrans );
 };
 
 //=
diff --git a/offapi/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.idl 
b/offapi/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.idl
index 98067e5..4dc018a 100644
--- a/offapi/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.idl
+++ b/offapi/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.idl
@@ -55,7 +55,7 @@ published struct 

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - drawinglayer/source sw/source

2012-04-20 Thread Caolán McNamara
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx |   22 +
 sw/source/core/layout/paintfrm.cxx|  185 --
 2 files changed, 180 insertions(+), 27 deletions(-)

New commits:
commit e435a78af84f04e1ea8907c70447a87841aa1186
Author: Michael Stahl mst...@redhat.com
Date:   Mon Apr 16 16:12:36 2012 +0200

fdo#38215: merge consecutive border lines:

This re-implements the merging that was done by SwLineRects::AddLineRect,
SwLineRect::MakeUnion with the drawing layer border lines.
This is used to merge borders of paragraphs and of tables that have the
separating border-model, which fixes both the tiny dividing gaps
between successive borders in the second bugdoc and the weird subtly
differently rendered successive borders in the first bugdoc.
(regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2)

(cherry-picked from 0868a0155a2b57daf7b862d120aead0458372b17
 and 44092833d3a0f0d6074c64bd0e64bbdf11109afe)

Conflicts:

sw/source/core/layout/paintfrm.cxx

Signed-off-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 1fd7013..797f3af 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -132,6 +132,9 @@
 
 using namespace ::editeng;
 using namespace ::com::sun::star;
+using ::drawinglayer::primitive2d::BorderLinePrimitive2D;
+using ::std::pair;
+using ::std::make_pair;
 
 #define GETOBJSHELL()   ((SfxObjectShell*)rSh.GetDoc()-GetDocShell())
 
@@ -223,19 +226,21 @@ public:
 
 class BorderLines
 {
-::comphelper::SequenceAsVector
- ::drawinglayer::primitive2d::Primitive2DReference m_Lines;
+typedef ::comphelper::SequenceAsVector
+::rtl::ReferenceBorderLinePrimitive2D  Lines_t;
+Lines_t m_Lines;
 public:
-void AddBorderLine(
-::drawinglayer::primitive2d::Primitive2DReference const xLine)
-{
-m_Lines.push_back(xLine);
-}
+void AddBorderLine(::rtl::ReferenceBorderLinePrimitive2D const xLine);
 drawinglayer::primitive2d::Primitive2DSequence GetBorderLines_Clear()
 {
 ::comphelper::SequenceAsVector
 ::drawinglayer::primitive2d::Primitive2DReference lines;
-::std::swap(m_Lines, lines);
+for (Lines_t::const_iterator it = m_Lines.begin(); it != m_Lines.end();
+++it)
+{
+lines.push_back(it-get());
+}
+m_Lines.clear();
 return lines.getAsConstList();
 }
 };
@@ -442,6 +447,121 @@ SwSavePaintStatics::~SwSavePaintStatics()
 
 SV_IMPL_VARARR( SwLRects, SwLineRect );
 
+static pairbool, pairdouble, double 
+lcl_TryMergeLines(pairdouble, double const mergeA,
+  pairdouble, double const mergeB)
+{
+double const fMergeGap(nPixelSzW + nHalfPixelSzW); // NOT static!
+if (   (mergeA.second + fMergeGap = mergeB.first )
+ (mergeA.first  - fMergeGap = mergeB.second))
+{
+return make_pair(true, make_pair(
+std::min(mergeA.first, mergeB.first),
+std::max(mergeA.second, mergeB.second)));
+}
+return make_pair(false, make_pair(0, 0));
+}
+
+static ::rtl::ReferenceBorderLinePrimitive2D
+lcl_MergeBorderLines(
+BorderLinePrimitive2D const rLine, BorderLinePrimitive2D const rOther,
+basegfx::B2DPoint const rStart, basegfx::B2DPoint const rEnd)
+{
+return new BorderLinePrimitive2D(rStart, rEnd,
+rLine.getLeftWidth(),
+rLine.getDistance(),
+rLine.getRightWidth(),
+rLine.getExtendLeftStart(),
+rOther.getExtendLeftEnd(),
+rLine.getExtendRightStart(),
+rOther.getExtendRightEnd(),
+rLine.getRGBColorLeft(),
+rLine.getRGBColorGap(),
+rLine.getRGBColorRight(),
+rLine.hasGapColor(),
+rLine.getStyle());
+}
+
+static ::rtl::ReferenceBorderLinePrimitive2D
+lcl_TryMergeBorderLine(BorderLinePrimitive2D const rThis,
+   BorderLinePrimitive2D const rOther)
+{
+assert(rThis.getEnd().getX() = rThis.getStart().getX());
+assert(rThis.getEnd().getY() = rThis.getStart().getY());
+assert(rOther.getEnd().getX() = rOther.getStart().getX());
+assert(rOther.getEnd().getY() = rOther.getStart().getY());
+double thisHeight = rThis.getEnd().getY() - rThis.getStart().getY();
+double thisWidth  = rThis.getEnd().getX() - rThis.getStart().getX();
+double otherHeight = rOther.getEnd().getY() -  rOther.getStart().getY();
+double otherWidth  = rOther.getEnd().getX() -  rOther.getStart().getX();
+// check for same orientation, same line width and matching colors
+if (((thisHeight  thisWidth) == (otherHeight  otherWidth))
+  (rThis.getLeftWidth() == rOther.getLeftWidth())
+  

[Libreoffice-commits] .: writerperfect/Library_wpftwriter.mk writerperfect/source

2012-04-20 Thread Fridrich Strba
 writerperfect/Library_wpftwriter.mk  |1 
 writerperfect/source/writer/MSWorksImportFilter.cxx  |   19 ++--
 writerperfect/source/writer/MSWorksImportFilter.hxx  |   11 +-
 writerperfect/source/writer/WordPerfectImportFilter.cxx  |   47 ---
 writerperfect/source/writer/WordPerfectImportFilter.hxx  |   21 +---
 writerperfect/source/writer/wpftwriter_genericfilter.cxx |   64 ---
 6 files changed, 65 insertions(+), 98 deletions(-)

New commits:
commit 0853a4d868bd2dff171c73cc1e495fa03320f7b1
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Fri Apr 20 15:37:25 2012 +0200

Monkey sberg's work for the other writerperfect library

diff --git a/writerperfect/Library_wpftwriter.mk 
b/writerperfect/Library_wpftwriter.mk
index 6110035..047f2cf 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_api,wpftwriter,\
 ))
 
 $(eval $(call gb_Library_use_libraries,wpftwriter,\
+   comphelper \
cppu \
cppuhelper \
vcl \
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx 
b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 2cca078..5712703 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -32,26 +32,30 @@
 #include osl/diagnose.h
 #include rtl/tencinfo.h
 
-#include com/sun/star/lang/XMultiServiceFactory.hpp
 #include com/sun/star/io/XInputStream.hpp
 #include com/sun/star/xml/sax/XAttributeList.hpp
 #include com/sun/star/xml/sax/XDocumentHandler.hpp
 #include com/sun/star/xml/sax/InputSource.hpp
 #include com/sun/star/xml/sax/XParser.hpp
+#include com/sun/star/io/XSeekable.hpp
+#include com/sun/star/uno/Reference.h
 #include com/sun/star/ucb/XCommandEnvironment.hpp
 
+#include comphelper/componentcontext.hxx
 #include xmloff/attrlist.hxx
 #include ucbhelper/content.hxx
 
+#include libwps/libwps.h
+
 #include filter/FilterInternal.hxx
 #include filter/DocumentHandler.hxx
 #include filter/OdtGenerator.hxx
+#include MSWorksImportFilter.hxx
 #include stream/WPXSvStream.h
 
-#include libwps/WPSDocument.h
-#include MSWorksImportFilter.hxx
+#include iostream
 
-// using namespace ::rtl;
+using namespace ::com::sun::star::uno;
 using rtl::OString;
 using rtl::OUString;
 using com::sun::star::uno::Sequence;
@@ -61,7 +65,6 @@ using com::sun::star::uno::UNO_QUERY;
 using com::sun::star::uno::XInterface;
 using com::sun::star::uno::Exception;
 using com::sun::star::uno::RuntimeException;
-using com::sun::star::lang::XMultiServiceFactory;
 using com::sun::star::beans::PropertyValue;
 using com::sun::star::document::XFilter;
 using com::sun::star::document::XExtendedFilterDetection;
@@ -102,7 +105,7 @@ throw (RuntimeException)
 
 // An XML import service: what we push sax messages to..
 OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( 
com.sun.star.comp.Writer.XMLOasisImporter ) );
-Reference  XDocumentHandler  xInternalHandler( mxMSF-createInstance( 
sXMLImportService ), UNO_QUERY );
+Reference  XDocumentHandler  xInternalHandler( 
comphelper::ComponentContext( mxContext ).createComponent( sXMLImportService ), 
UNO_QUERY );
 
 // The XImporter sets up an empty target document for XDocumentHandler to 
write to..
 Reference  XImporter  xImporter(xInternalHandler, UNO_QUERY);
@@ -251,10 +254,10 @@ throw (RuntimeException)
 #undef SERVICE_NAME2
 #undef SERVICE_NAME1
 
-Reference XInterface  SAL_CALL MSWorksImportFilter_createInstance( const 
Reference XMultiServiceFactory   rSMgr)
+Reference XInterface  SAL_CALL MSWorksImportFilter_createInstance( const 
Reference XComponentContext   rContext)
 throw( Exception )
 {
-return (cppu::OWeakObject *) new MSWorksImportFilter( rSMgr );
+return (cppu::OWeakObject *) new MSWorksImportFilter( rContext );
 }
 
 // XServiceInfo
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx 
b/writerperfect/source/writer/MSWorksImportFilter.hxx
index 6ef5485..db679eb 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
@@ -35,6 +35,7 @@
 #include com/sun/star/document/XExtendedFilterDetection.hpp
 #include com/sun/star/lang/XInitialization.hpp
 #include com/sun/star/lang/XServiceInfo.hpp
+#include com/sun/star/uno/XComponentContext.hpp
 #include com/sun/star/xml/sax/XDocumentHandler.hpp
 #include cppuhelper/implbase5.hxx
 
@@ -51,8 +52,7 @@ class MSWorksImportFilter : public cppu::WeakImplHelper5
 
 {
 protected:
-// oo.org declares
-::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory  mxMSF;
+::com::sun::star::uno::Reference ::com::sun::star::uno::XComponentContext 
 mxContext;
 ::com::sun::star::uno::Reference ::com::sun::star::lang::XComponent  
mxDoc;
 ::rtl::OUString msFilterName;
 ::com::sun::star::uno::Reference 
::com::sun::star::xml::sax::XDocumentHandler  

[Libreoffice-commits] .: writerfilter/source

2012-04-20 Thread Miklos Vajna
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit dd1fbdd27d44ac237a36579a8858983d5ab6d637
Author: Miklos Vajna vmik...@suse.cz
Date:   Fri Apr 20 15:29:20 2012 +0200

RTFDocumentImpl::resolvePict: use new-style uno ctor

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4a0eb27..2527cef 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -27,7 +27,7 @@
 
 #include com/sun/star/beans/PropertyAttribute.hpp
 #include com/sun/star/document/XDocumentPropertiesSupplier.hpp
-#include com/sun/star/graphic/XGraphicProvider.hpp
+#include com/sun/star/graphic/GraphicProvider.hpp
 #include com/sun/star/io/UnexpectedEOFException.hpp
 #include com/sun/star/text/XTextFrame.hpp
 #include com/sun/star/text/SizeType.hpp
@@ -647,8 +647,7 @@ int RTFDocumentImpl::resolvePict(bool bInline)
 beans::PropertyValues aMediaProperties(1);
 aMediaProperties[0].Name = URL;
 aMediaProperties[0].Value = aGraphicUrl;
-uno::Referencegraphic::XGraphicProvider 
xGraphicProvider(m_xContext-getServiceManager()-createInstanceWithContext(com.sun.star.graphic.GraphicProvider,
 m_xContext),
-uno::UNO_QUERY_THROW);
+uno::Referencegraphic::XGraphicProvider 
xGraphicProvider(graphic::GraphicProvider::create(m_xContext));
 uno::Referencegraphic::XGraphic xGraphic = 
xGraphicProvider-queryGraphic(aMediaProperties);
 xPropertySet-setPropertyValue(Graphic, uno::Any(xGraphic));
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

2012-04-20 Thread Andras Timar
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 299387dab1b365427cc44d810026facd30e11a31
Author: Miklos Vajna vmik...@suse.cz
Date:   Fri Apr 20 12:42:23 2012 +0200

fdo#48356 fix RTF import of special unicode characters

The \'0d string should not be an exception when ignoring characters
after the \u control word.

Signed-off-by: Andras Timar ati...@suse.com

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9633176..016943d 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -784,7 +784,7 @@ int RTFDocumentImpl::resolveChars(char ch)
 bool bSkipped = false;
 while(!Strm().IsEof()  ch != '{'  ch != '}'  ch != '\\')
 {
-if (ch != 0x0d  ch != 0x0a)
+if (m_aStates.top().nInternalState == INTERNAL_HEX || (ch != 0x0d  
ch != 0x0a))
 {
 if (m_aStates.top().nCharsToSkip == 0)
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: test/source

2012-04-20 Thread Caolán McNamara
 test/source/sheet/xdatabaserange.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 6a018dec6b1abe75464bd510d441ab56d7291e1f
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 20 13:47:32 2012 +0100

WaE: MSVC2008 C2220 unsafe mix of types in operation

diff --git a/test/source/sheet/xdatabaserange.cxx 
b/test/source/sheet/xdatabaserange.cxx
index 381e892..7715305 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -91,15 +91,15 @@ void XDatabaseRange::testGetSortDescriptor()
 
 if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(IsSortColumns)))
 {
-sal_Bool bIsSortColumns = true;
+sal_Bool bIsSortColumns = sal_True;
 xProp.Value = bIsSortColumns;
-CPPUNIT_ASSERT(bIsSortColumns == true);
+CPPUNIT_ASSERT(bIsSortColumns == sal_True);
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ContainsHeader)))
 {
-sal_Bool bContainsHeader = true;
+sal_Bool bContainsHeader = sal_True;
 xProp.Value = bContainsHeader;
-CPPUNIT_ASSERT(bContainsHeader == true);
+CPPUNIT_ASSERT(bContainsHeader == sal_True);
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MaxFieldCount)))
 {
@@ -114,15 +114,15 @@ void XDatabaseRange::testGetSortDescriptor()
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(BindFormatsToContent)))
 {
-sal_Bool bBindFormatsToContent = false;
+sal_Bool bBindFormatsToContent = sal_False;
 xProp.Value = bBindFormatsToContent;
-CPPUNIT_ASSERT(bBindFormatsToContent == true);
+CPPUNIT_ASSERT(bBindFormatsToContent == sal_False);
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CopyOutputData)))
 {
-sal_Bool bCopyOutputData = true;
+sal_Bool bCopyOutputData = sal_True;
 xProp.Value = bCopyOutputData;
-CPPUNIT_ASSERT(bCopyOutputData == false);
+CPPUNIT_ASSERT(bCopyOutputData == sal_False);
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(OutputPosition)))
 {
@@ -130,9 +130,9 @@ void XDatabaseRange::testGetSortDescriptor()
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(IsUserListEnabled)))
 {
-sal_Bool bIsUserListEnabled  = true;
+sal_Bool bIsUserListEnabled  = sal_True;
 xProp.Value = bIsUserListEnabled;
-CPPUNIT_ASSERT(bIsUserListEnabled == false);
+CPPUNIT_ASSERT(bIsUserListEnabled == sal_False);
 
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UserListIndex)))
@@ -180,7 +180,7 @@ void XDatabaseRange::testRefresh()
 uno::Reference beans::XPropertySet  xPropRow(xRow, UNO_QUERY_THROW);
 Any aAny = xPropRow-getPropertyValue( aHidden );
 
-CPPUNIT_ASSERT( aAny.getsal_Bool() == true);
+CPPUNIT_ASSERT(aAny.getsal_Bool() == sal_True);
 }
 
 xDBRange-refresh();
@@ -194,7 +194,7 @@ void XDatabaseRange::testRefresh()
 uno::Reference beans::XPropertySet  xPropRow(xRow, UNO_QUERY_THROW);
 Any aAny = xPropRow-getPropertyValue( aHidden );
 
-CPPUNIT_ASSERT( aAny.getsal_Bool() == false);
+CPPUNIT_ASSERT(aAny.getsal_Bool() == sal_False);
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5-3' - sc/inc sc/source

2012-04-20 Thread Kohei Yoshida
 sc/inc/compiler.hxx  |9 ++-
 sc/inc/rangenam.hxx  |6 ++--
 sc/source/core/data/table1.cxx   |   10 ---
 sc/source/core/tool/compiler.cxx |   50 +++
 sc/source/core/tool/rangenam.cxx |   10 +++
 5 files changed, 42 insertions(+), 43 deletions(-)

New commits:
commit 51648779ccf76bc7c6b6ff1ed4cd32eb75af9a5a
Author: Eike Rathke er...@redhat.com
Date:   Fri Apr 20 00:20:29 2012 +0200

resolved fdo#48856 update sheet-local named expressions correctly

This combines from master:

44481da569df85aa91455fdc2892a4e0c5818e6c
Author: Markus Mohrhard markus.mohrh...@googlemail.com

update relative local range names, fdo#48856

Signed-off-by: Eike Rathke er...@redhat.com

409f11ae387c859dcf9275c08093649a676e1f9e
Author: Eike Rathke er...@redhat.com

fdo#48856 update sheet-local named expressions correctly

* Named expression must be updated before any formulas that would access 
them.
* Handle all ocName tokens differentiating between global and sheet-local
  names.

Signed-off-by: Markus Mohrhard markus.mohrh...@googlemail.com
Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com
Signed-off-by: Noel Power nopo...@suse.com

diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 371192c..765187e 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -364,6 +364,13 @@ private:
 
 void SetRelNameReference();
 
+/** Obtain range data for ocName token, global or sheet local.
+
+Prerequisite: rToken is a FormulaIndexToken so IsGlobal() and
+GetIndex() can be called on it. We don't check with RTTI.
+ */
+ScRangeData* GetRangeData( const formula::FormulaToken pToken ) const;
+
 static void InitCharClassEnglish();
 
 public:
@@ -442,7 +449,7 @@ public:
 bool UpdateNameReference( UpdateRefMode eUpdateRefMode,
   const ScRange,
   SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
-  bool rChanged, bool bSharedFormula = false);
+  bool rChanged, bool bSharedFormula = false, 
bool bLocal = false);
 
 ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode,
   const ScAddress rOldPos, const ScRange,
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 53e9ec8..e2bf10b 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -140,7 +140,7 @@ public:
 const formula::FormulaGrammar::Grammar 
eGrammar = formula::FormulaGrammar::GRAM_DEFAULT );
 voidUpdateReference( UpdateRefMode eUpdateRefMode,
  const ScRange r,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bLocal = 
false );
 boolIsModified() const  { return bModified; }
 
 SC_DLLPUBLIC void   GuessPosition();
@@ -203,9 +203,9 @@ public:
 SC_DLLPUBLIC const ScRangeData* findByRange(const ScRange rRange) const;
 SC_DLLPUBLIC ScRangeData* findByUpperName(const rtl::OUString rName);
 SC_DLLPUBLIC const ScRangeData* findByUpperName(const rtl::OUString 
rName) const;
-SC_DLLPUBLIC ScRangeData* findByIndex(sal_uInt16 i);
+SC_DLLPUBLIC ScRangeData* findByIndex(sal_uInt16 i) const;
 void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange rRange,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bLocal = 
false);
 void UpdateTabRef(SCTAB nTable, sal_uInt16 nFlag, SCTAB nNewTable = 0, 
SCTAB nNewSheets = 1);
 void UpdateTranspose(const ScRange rSource, const ScAddress rDest);
 void UpdateGrow(const ScRange rArea, SCCOL nGrowX, SCROW nGrowY);
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 31c3f46..76f371b 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1317,16 +1317,18 @@ void ScTable::UpdateReference( UpdateRefMode 
eUpdateRefMode, SCCOL nCol1, SCROW
 i = 0;
 iMax = MAXCOL;
 }
-for ( ; i=iMax; i++)
-bUpdated |= aCol[i].UpdateReference(
-eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, 
nDy, nDz, pUndoDoc );
 
+// Named expressions need to be updated before formulas acessing them.
 if (mpRangeName)
 {
 ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );;
-mpRangeName-UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
+mpRangeName-UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz, 
true );
 }
 
+for ( ; i=iMax; i++)
+bUpdated |= aCol[i].UpdateReference(
+eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, 
nDy, nDz, pUndoDoc );
+
 if ( bIncludeDraw )
 

[Libreoffice-commits] .: bug/bug.xhtml

2012-04-20 Thread Jan Holesovsky
 bug/bug.xhtml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff2462fa7f5a6c95e830c3b71a3d48a5200e77c7
Author: Jan Holesovsky ke...@suse.cz
Date:   Fri Apr 20 16:43:37 2012 +0200

Fix the URL when the user does has JavaScript disabled.

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index c0f017b..cc780e9 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -40,7 +40,7 @@
   div class=message unsupportedThis browser version is not supported 
and this page cannot be displayed properly./div
   div class=message nojavascriptJavaScript is disabled and this page 
cannot be displayed./div
   div class=message
-pPlease use a 
href=/enter_bug.cgi?product=LibreOffice;bug_status=UNCONFIRMED;version=?bugzilla/a
 instead to report a problem./p
+pPlease use a 
href=http://bugs.freedesktop.org/enter_bug.cgi?product=LibreOffice;bug_status=UNCONFIRMED;version=?;bugzilla/a
 instead to report a problem./p
 pIt works on all browsers and when JavaScript is disabled./p
   /div
   div class=eyecandy/div
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - oovbaapi/ooo sc/source

2012-04-20 Thread Noel Power
 oovbaapi/ooo/vba/excel/XApplication.idl |5 +
 sc/source/ui/inc/viewutil.hxx   |2 
 sc/source/ui/vba/vbaapplication.cxx |   86 +++-
 sc/source/ui/vba/vbaapplication.hxx |   11 
 4 files changed, 101 insertions(+), 3 deletions(-)

New commits:
commit 101132c28a8f084612106337f4cafe21c535dea8
Author: Noel Power noel.po...@novell.com
Date:   Fri Apr 20 18:25:45 2012 +0100

add stub vba implementation Application methods

added Application.DisplayExcel4Menus, Application.DisplayNoteIndicator, 
Application.ShowWindowsInTaskbar. Althought these attributes of the Application 
object don't do anything they allow setting and retrieval of the state. We 
could make a usable implementation for Application.DisplayNoteIndicator, the 
others though don't really seem to have any useful equivalent in the 
libreoffice world

diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl 
b/oovbaapi/ooo/vba/excel/XApplication.idl
index 866ab21..baf6468 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -76,6 +76,9 @@ interface XApplication
 [attribute] long EnableCancelKey;
 [attribute] boolean DisplayFullScreen;
 [attribute] boolean DisplayScrollBars;
+[attribute] boolean DisplayExcel4Menus;
+[attribute] boolean DisplayNoteIndicator;
+[attribute] boolean ShowWindowsInTaskbar;
 
 void setDefaultFilePath([in] string DefaultFilePath) 
raises(com::sun::star::script::BasicErrorException);
 
diff --git a/sc/source/ui/vba/vbaapplication.cxx 
b/sc/source/ui/vba/vbaapplication.cxx
index 4963882..bb31732 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -154,14 +154,19 @@ struct ScVbaAppSettings
 sal_Int32 mnCalculation;
 sal_Bool mbDisplayAlerts;
 sal_Bool mbEnableEvents;
-
+sal_Bool mbExcel4Menus;
+sal_Bool mbDisplayNoteIndicator;
+sal_Bool mbShowWindowsInTaskbar;
 explicit ScVbaAppSettings();
 };
 
 ScVbaAppSettings::ScVbaAppSettings() :
 mnCalculation( excel::XlCalculation::xlCalculationAutomatic ),
 mbDisplayAlerts( sal_True ),
-mbEnableEvents( sal_True )
+mbEnableEvents( sal_True ),
+mbExcel4Menus( sal_False ),
+mbDisplayNoteIndicator( sal_True ),
+mbShowWindowsInTaskbar( sal_True )
 {
 }
 
@@ -916,6 +921,42 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet )  
throw (uno::RuntimeExce
 }
 
 sal_Bool SAL_CALL
+ScVbaApplication::getDisplayExcel4Menus() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbExcel4Menus;
+}
+
+void SAL_CALL
+ScVbaApplication::setDisplayExcel4Menus( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbExcel4Menus = bSet;
+}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getDisplayNoteIndicator() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbDisplayNoteIndicator;
+}
+
+void SAL_CALL
+ScVbaApplication::setDisplayNoteIndicator( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbDisplayNoteIndicator = bSet;
+}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getShowWindowsInTaskbar() throw (css::uno::RuntimeException)
+{
+return mrAppSettings.mbShowWindowsInTaskbar;
+}
+
+void SAL_CALL
+ScVbaApplication::setShowWindowsInTaskbar( sal_Bool bSet ) throw 
(css::uno::RuntimeException)
+{
+mrAppSettings.mbShowWindowsInTaskbar = bSet;
+}
+
+sal_Bool SAL_CALL
 ScVbaApplication::getVisible() throw (uno::RuntimeException)
 {
 sal_Bool bVisible = sal_True;
diff --git a/sc/source/ui/vba/vbaapplication.hxx 
b/sc/source/ui/vba/vbaapplication.hxx
index 9b1c528..0f72d7b 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -126,6 +126,13 @@ public:
 virtual void SAL_CALL setDisplayFullScreen( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
 virtual sal_Bool SAL_CALL getDisplayScrollBars() throw 
(css::uno::RuntimeException);
 virtual void SAL_CALL setDisplayScrollBars( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+virtual sal_Bool SAL_CALL getDisplayExcel4Menus() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setDisplayExcel4Menus( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+
+virtual sal_Bool SAL_CALL getDisplayNoteIndicator() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setDisplayNoteIndicator( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
+virtual sal_Bool SAL_CALL getShowWindowsInTaskbar() throw 
(css::uno::RuntimeException);
+virtual void SAL_CALL setShowWindowsInTaskbar( sal_Bool bSet ) throw 
(css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL Windows( const css::uno::Any aIndex ) 
throw (css::uno::RuntimeException);
 virtual void SAL_CALL wait( double time ) throw 
(css::uno::RuntimeException);
 virtual css::uno::Any SAL_CALL Range( const css::uno::Any Cell1, const 
css::uno::Any Cell2 ) throw (css::uno::RuntimeException);
commit 

[Libreoffice-commits] .: 2 commits - configure.in test/Library_test.mk

2012-04-20 Thread Lubos Lunak
 configure.in |2 +-
 test/Library_test.mk |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1b62ccdcb5a44effe4f6f9de105d96fbbd18102d
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Apr 20 20:07:57 2012 +0200

it seems tests runtime-depend on ucpchelp1 too

CppunitTest_sc_databaserangeobj can fail with
'UcbContentProviderProxy::getContentProvider - No provider for 
´com.sun.star.help.XMLHelp.'

diff --git a/test/Library_test.mk b/test/Library_test.mk
index 571d26c..b795f8a 100644
--- a/test/Library_test.mk
+++ b/test/Library_test.mk
@@ -56,6 +56,7 @@ ifeq ($(GUIBASE),unx)
 $(call gb_Library_get_target,test) : \
 $(call gb_Library_get_target,desktop_detector) \
 $(call gb_Library_get_target,vclplug_svp) \
+$(call gb_Library_get_target,ucpchelp1) \
 
 endif
 
commit 4be258a2f7aa10b781e2a67545d547cd6cac192a
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Apr 20 13:34:59 2012 +0200

fix typo

diff --git a/configure.in b/configure.in
index c3847c1..15d8ce6 100644
--- a/configure.in
+++ b/configure.in
@@ -966,7 +966,7 @@ AC_ARG_WITH(vba-package-format,
  means the api component and associated type library are  part of the
  installation set. Specifying extn creates an uno extension that is
  part of the installation set (located in the program directory) that
- MUST be optionly registered using either the unopkg executeable or the
+ MUST be optionally registered using either the unopkg executeable or 
the
  extension manager gui.])
 [
   Note: builtin is the default, extn can cause
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - editeng/source sax/qa sax/source xmloff/source

2012-04-20 Thread Michael Stahl
 editeng/source/editeng/editdoc.cxx |4 
 sax/qa/cppunit/test_converter.cxx  |   72 +
 sax/source/tools/converter.cxx |  155 ++---
 xmloff/source/core/xmluconv.cxx|2 
 4 files changed, 219 insertions(+), 14 deletions(-)

New commits:
commit ee376102becc16c0c44d23e5eb2a322aadc45197
Author: Michael Stahl mst...@redhat.com
Date:   Fri Apr 20 18:39:36 2012 +0200

fdo#48969: add unit test for Converter::convertDouble

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index 4a3d364..a8dad87 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -39,11 +39,13 @@
 #include com/sun/star/util/DateTime.hpp
 #include com/sun/star/util/Date.hpp
 #include com/sun/star/util/Duration.hpp
+#include com/sun/star/util/MeasureUnit.hpp
 
 #include sax/tools/converter.hxx
 
 
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::util::MeasureUnit;
 using sax::Converter;
 
 
@@ -58,10 +60,12 @@ public:
 
 void testDuration();
 void testDateTime();
+void testDouble();
 
 CPPUNIT_TEST_SUITE(ConverterTest);
 CPPUNIT_TEST(testDuration);
 CPPUNIT_TEST(testDateTime);
+CPPUNIT_TEST(testDouble);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -249,6 +253,74 @@ void ConverterTest::testDateTime()
 OSL_TRACE(\nSAX CONVERTER TEST END);
 }
 
+void doTestDouble(char const*const pis, double const rd,
+sal_Int16 const nSourceUnit, sal_Int16 const nTargetUnit)
+{
+::rtl::OUString const is(::rtl::OUString::createFromAscii(pis));
+double od;
+bool bSuccess(Converter::convertDouble(od, is, nSourceUnit, nTargetUnit));
+OSL_TRACE(%f, od);
+CPPUNIT_ASSERT(bSuccess);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(rd, od, 0.0001);
+::rtl::OUStringBuffer buf;
+Converter::convertDouble(buf, od, true, nTargetUnit, nSourceUnit);
+OSL_TRACE(%s,
+::rtl::OUStringToOString(buf.getStr(), 
RTL_TEXTENCODING_UTF8).getStr());
+CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
+}
+
+void ConverterTest::testDouble()
+{
+doTestDouble(42, 42.0, TWIP, TWIP);
+doTestDouble(42, 42.0, POINT, POINT);
+doTestDouble(42, 42.0, MM_100TH, MM_100TH);
+doTestDouble(42, 42.0, MM_10TH, MM_10TH);
+doTestDouble(42, 42.0, MM, MM); // identity don't seem to add unit?
+doTestDouble(42, 42.0, CM, CM);
+doTestDouble(42, 42.0, INCH, INCH);
+doTestDouble(2pt, 40.0, POINT, TWIP);
+doTestDouble(20pc, 1, TWIP, POINT);
+doTestDouble(4, 2.26771653543307, MM_100TH, TWIP);
+doTestDouble(4, 22.6771653543307, MM_10TH, TWIP);
+doTestDouble(4mm, 226.771653543307, MM, TWIP);
+doTestDouble(4cm, 2267.71653543307, CM, TWIP);
+doTestDouble(4in, 5760.0, INCH, TWIP);
+doTestDouble(1440pc, 1.0, TWIP, INCH);
+doTestDouble(567pc, 1.000125, TWIP, CM);
+doTestDouble(56.7pc, 1.000125, TWIP, MM);
+doTestDouble(5.67pc, 1.000125, TWIP, MM_10TH);
+doTestDouble(0.567pc, 1.000125, TWIP, MM_100TH);
+doTestDouble(42pt, 1.48166, POINT, CM);
+doTestDouble(42pt, 14.8166, POINT, MM);
+doTestDouble(42pt, 148.166, POINT, MM_10TH);
+doTestDouble(42pt, 1481.66, POINT, MM_100TH);
+doTestDouble(72pt, 1.0, POINT, INCH);
+doTestDouble(3.5in, 8.89, INCH, CM);
+doTestDouble(3.5in, 88.9, INCH, MM);
+doTestDouble(3.5in, 889.0, INCH, MM_10TH);
+doTestDouble(3.5in, 8890.0, INCH, MM_100TH);
+doTestDouble(2in, 144, INCH, POINT);
+doTestDouble(5.08cm, 2.0, CM, INCH);
+doTestDouble(3.5cm, 3500.0, CM, MM_100TH);
+doTestDouble(3.5cm, 350.0, CM, MM_10TH);
+doTestDouble(3.5cm, 35.0, CM, MM);
+doTestDouble(10cm, 283.464566929134, CM, POINT);
+doTestDouble(0.5cm, 283.464566929134, CM, TWIP);
+doTestDouble(10mm, 28.3464566929134, MM, POINT);
+doTestDouble(0.5mm, 28.3464566929134, MM, TWIP);
+doTestDouble(10, 2.83464566929134, MM_10TH, POINT);
+doTestDouble(0.5, 2.83464566929134, MM_10TH, TWIP);
+doTestDouble(10, 0.283464566929134, MM_100TH, POINT);
+doTestDouble(0.5, 0.283464566929134, MM_100TH, TWIP);
+doTestDouble(10mm, 1.0, MM, CM);
+doTestDouble(10mm, 100.0, MM, MM_10TH);
+doTestDouble(20mm, 2000.0, MM, MM_100TH);
+doTestDouble(300, 30.0, MM_10TH, MM);
+doTestDouble(400, 4.0, MM_100TH, MM);
+doTestDouble(600, 6000.0, MM_10TH, MM_100TH);
+doTestDouble(700, 70.0, MM_100TH, MM_10TH);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ConverterTest);
 
 }
commit 62a0b2405798a3be6a4e38652f1da7a685c84bfc
Author: Michael Stahl mst...@redhat.com
Date:   Fri Apr 20 18:36:16 2012 +0200

fdo#48969: GetConversionFactor: add inch as source unit

Also, add whole bunch of missing cases while at it.

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 4fe6d7f..e8fe38e 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1788,9 +1788,16 @@ double 

[Libreoffice-commits] .: 2 commits - basic/inc basic/source toolkit/inc

2012-04-20 Thread Caolán McNamara
 basic/inc/basic/sbmod.hxx |6 +++---
 basic/source/classes/sbxmod.cxx   |6 --
 toolkit/inc/toolkit/helper/macros.hxx |2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit b2fdaed46509127ec3ac2fb87404bc1b51d8
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 20 20:01:54 2012 +0100

WaE: MSVC2008 C2220 unsafe mix of types in operation

diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 24700e9..392082b 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -73,7 +73,7 @@ protected:
 SbiImage*   pImage;// the Image
 SbiBreakpoints* pBreaks;   // Breakpoints
 SbClassData*pClassData;
-sal_Bool mbVBACompat;
+bool mbVBACompat;
 sal_Int32 mnType;
 SbxObjectRef pDocObject; // an impl object ( used by Document Modules )
 boolbIsProxyModule;
@@ -139,8 +139,8 @@ public:
 sal_Bool ExceedsLegacyModuleSize();
 void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
 bool HasExeCode();
-sal_Bool IsVBACompat() const;
-void SetVBACompat( sal_Bool bCompat );
+bool IsVBACompat() const;
+void SetVBACompat( bool bCompat );
 sal_Int32 GetModuleType() { return mnType; }
 void SetModuleType( sal_Int32 nType ) { mnType = nType; }
 bool isProxyModule() { return bIsProxyModule; }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 9d3a4b9..87928cf 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1077,15 +1077,17 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
 if( ((StarBASIC*)p) != pBasic )
 ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p );
 }
-sal_Bool SbModule::IsVBACompat() const
+
+bool SbModule::IsVBACompat() const
 {
 return mbVBACompat;
 }
 
-void SbModule::SetVBACompat( sal_Bool bCompat )
+void SbModule::SetVBACompat( bool bCompat )
 {
 mbVBACompat = bCompat;
 }
+
 // Run a Basic-subprogram
 sal_uInt16 SbModule::Run( SbMethod* pMeth )
 {
commit 6f9971f3b935f669b39d7a53266950ee92955027
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 20 15:16:43 2012 +0100

WaE: MSVC20082 unreferenced argument

diff --git a/toolkit/inc/toolkit/helper/macros.hxx 
b/toolkit/inc/toolkit/helper/macros.hxx
index b2acbf2..3d59e60 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -176,7 +176,7 @@ void ClassName::disposing( const 
::com::sun::star::lang::EventObject ) throw(::
 sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), 
RTL_TEXTENCODING_ASCII_US ); \
 OSL_FAIL( sMessage.getStr() );
 #else
-#define DISPLAY_EXCEPTION( ClassName, MethodName, e )
+#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e;
 #endif
 
 #define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( ClassName, 
InterfaceName, MethodName, ParamType1, ParamType2 ) \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - sax/qa sax/source xmloff/source

2012-04-20 Thread Fridrich Strba
 sax/qa/cppunit/test_converter.cxx |   72 +
 sax/source/tools/converter.cxx|  155 +++---
 xmloff/source/core/xmluconv.cxx   |2 
 3 files changed, 217 insertions(+), 12 deletions(-)

New commits:
commit 3186b307260cf4e633c252022b803dcf6f31273c
Author: Michael Stahl mst...@redhat.com
Date:   Fri Apr 20 18:39:36 2012 +0200

fdo#48969: add unit test for Converter::convertDouble

Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index 4a3d364..a8dad87 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -39,11 +39,13 @@
 #include com/sun/star/util/DateTime.hpp
 #include com/sun/star/util/Date.hpp
 #include com/sun/star/util/Duration.hpp
+#include com/sun/star/util/MeasureUnit.hpp
 
 #include sax/tools/converter.hxx
 
 
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::util::MeasureUnit;
 using sax::Converter;
 
 
@@ -58,10 +60,12 @@ public:
 
 void testDuration();
 void testDateTime();
+void testDouble();
 
 CPPUNIT_TEST_SUITE(ConverterTest);
 CPPUNIT_TEST(testDuration);
 CPPUNIT_TEST(testDateTime);
+CPPUNIT_TEST(testDouble);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -249,6 +253,74 @@ void ConverterTest::testDateTime()
 OSL_TRACE(\nSAX CONVERTER TEST END);
 }
 
+void doTestDouble(char const*const pis, double const rd,
+sal_Int16 const nSourceUnit, sal_Int16 const nTargetUnit)
+{
+::rtl::OUString const is(::rtl::OUString::createFromAscii(pis));
+double od;
+bool bSuccess(Converter::convertDouble(od, is, nSourceUnit, nTargetUnit));
+OSL_TRACE(%f, od);
+CPPUNIT_ASSERT(bSuccess);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(rd, od, 0.0001);
+::rtl::OUStringBuffer buf;
+Converter::convertDouble(buf, od, true, nTargetUnit, nSourceUnit);
+OSL_TRACE(%s,
+::rtl::OUStringToOString(buf.getStr(), 
RTL_TEXTENCODING_UTF8).getStr());
+CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
+}
+
+void ConverterTest::testDouble()
+{
+doTestDouble(42, 42.0, TWIP, TWIP);
+doTestDouble(42, 42.0, POINT, POINT);
+doTestDouble(42, 42.0, MM_100TH, MM_100TH);
+doTestDouble(42, 42.0, MM_10TH, MM_10TH);
+doTestDouble(42, 42.0, MM, MM); // identity don't seem to add unit?
+doTestDouble(42, 42.0, CM, CM);
+doTestDouble(42, 42.0, INCH, INCH);
+doTestDouble(2pt, 40.0, POINT, TWIP);
+doTestDouble(20pc, 1, TWIP, POINT);
+doTestDouble(4, 2.26771653543307, MM_100TH, TWIP);
+doTestDouble(4, 22.6771653543307, MM_10TH, TWIP);
+doTestDouble(4mm, 226.771653543307, MM, TWIP);
+doTestDouble(4cm, 2267.71653543307, CM, TWIP);
+doTestDouble(4in, 5760.0, INCH, TWIP);
+doTestDouble(1440pc, 1.0, TWIP, INCH);
+doTestDouble(567pc, 1.000125, TWIP, CM);
+doTestDouble(56.7pc, 1.000125, TWIP, MM);
+doTestDouble(5.67pc, 1.000125, TWIP, MM_10TH);
+doTestDouble(0.567pc, 1.000125, TWIP, MM_100TH);
+doTestDouble(42pt, 1.48166, POINT, CM);
+doTestDouble(42pt, 14.8166, POINT, MM);
+doTestDouble(42pt, 148.166, POINT, MM_10TH);
+doTestDouble(42pt, 1481.66, POINT, MM_100TH);
+doTestDouble(72pt, 1.0, POINT, INCH);
+doTestDouble(3.5in, 8.89, INCH, CM);
+doTestDouble(3.5in, 88.9, INCH, MM);
+doTestDouble(3.5in, 889.0, INCH, MM_10TH);
+doTestDouble(3.5in, 8890.0, INCH, MM_100TH);
+doTestDouble(2in, 144, INCH, POINT);
+doTestDouble(5.08cm, 2.0, CM, INCH);
+doTestDouble(3.5cm, 3500.0, CM, MM_100TH);
+doTestDouble(3.5cm, 350.0, CM, MM_10TH);
+doTestDouble(3.5cm, 35.0, CM, MM);
+doTestDouble(10cm, 283.464566929134, CM, POINT);
+doTestDouble(0.5cm, 283.464566929134, CM, TWIP);
+doTestDouble(10mm, 28.3464566929134, MM, POINT);
+doTestDouble(0.5mm, 28.3464566929134, MM, TWIP);
+doTestDouble(10, 2.83464566929134, MM_10TH, POINT);
+doTestDouble(0.5, 2.83464566929134, MM_10TH, TWIP);
+doTestDouble(10, 0.283464566929134, MM_100TH, POINT);
+doTestDouble(0.5, 0.283464566929134, MM_100TH, TWIP);
+doTestDouble(10mm, 1.0, MM, CM);
+doTestDouble(10mm, 100.0, MM, MM_10TH);
+doTestDouble(20mm, 2000.0, MM, MM_100TH);
+doTestDouble(300, 30.0, MM_10TH, MM);
+doTestDouble(400, 4.0, MM_100TH, MM);
+doTestDouble(600, 6000.0, MM_10TH, MM_100TH);
+doTestDouble(700, 70.0, MM_100TH, MM_10TH);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ConverterTest);
 
 }
commit 124881b16fee79be683507928c06ce54a5a2543e
Author: Michael Stahl mst...@redhat.com
Date:   Fri Apr 20 18:36:16 2012 +0200

fdo#48969: GetConversionFactor: add inch as source unit

Also, add whole bunch of missing cases while at it.

Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index cf5a5b5..51be183 100644
--- 

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sax/qa

2012-04-20 Thread Fridrich Strba
 sax/qa/cppunit/test_converter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 580a7f24c373cd8cf068fc92fdb153025e6d0a1d
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Fri Apr 20 22:30:26 2012 +0200

Minor backporting fix

Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index a8dad87..023177f 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -266,7 +266,7 @@ void doTestDouble(char const*const pis, double const rd,
 Converter::convertDouble(buf, od, true, nTargetUnit, nSourceUnit);
 OSL_TRACE(%s,
 ::rtl::OUStringToOString(buf.getStr(), 
RTL_TEXTENCODING_UTF8).getStr());
-CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
+CPPUNIT_ASSERT(buf.makeStringAndClear().equals(is));
 }
 
 void ConverterTest::testDouble()
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cppuhelper/source

2012-04-20 Thread Stephan Bergmann
 cppuhelper/source/defaultbootstrap.cxx  |6 +++---
 cppuhelper/source/servicefactory.cxx|2 +-
 cppuhelper/source/servicefactory_detail.hxx |1 +
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 18a9e9e844d2f3ebad52e6c45095e3c50422db1a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 20 23:37:14 2012 +0200

Various clean up of previous commit

diff --git a/cppuhelper/source/defaultbootstrap.cxx 
b/cppuhelper/source/defaultbootstrap.cxx
index 8698f25..4921011 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -1268,7 +1268,7 @@ void ServiceManager::readRdbFile(rtl::OUString const  
uri, bool optional) {
 try {
 Parser(
 uri, css::uno::Reference css::uno::XComponentContext (), data_);
-} catch (css::container::NoSuchElementException SB) {
+} catch (css::container::NoSuchElementException ) {
 if (!optional) {
 throw css::uno::DeploymentException(
 uri + : no such file,
@@ -1279,7 +1279,7 @@ void ServiceManager::readRdbFile(rtl::OUString const  
uri, bool optional) {
 throw css::uno::DeploymentException(
 InvalidRegistryException:  + e.Message,
 static_cast cppu::OWeakObject * (this));
-} catch (css::uno::RuntimeException SB) {
+} catch (css::uno::RuntimeException ) {
 if (!readLegacyRdbFile(uri)) {
 throw;
 }
@@ -1593,7 +1593,7 @@ bool ServiceManager::removeLegacyFactory(
 css::uno::Reference css::lang::XComponent  comp;
 {
 osl::MutexGuard g(rBHelper.rMutex);
-DynamicImplementations::const_iterator i(
+DynamicImplementations::iterator i(
 data_.dynamicImplementations.find(factoryInfo));
 if (i == data_.dynamicImplementations.end()) {
 return isDisposed();
diff --git a/cppuhelper/source/servicefactory.cxx 
b/cppuhelper/source/servicefactory.cxx
index 2b7c9ed..062e7ff 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -374,7 +374,7 @@ void addFactories(
 
 } // namespace
 
-SAL_DLLPUBLIC_EXPORT Reference lang::XMultiComponentFactory  
bootstrapInitialSF(
+Reference lang::XMultiComponentFactory  bootstrapInitialSF(
 OUString const  rBootstrapPath )
 SAL_THROW( (Exception) )
 {
diff --git a/cppuhelper/source/servicefactory_detail.hxx 
b/cppuhelper/source/servicefactory_detail.hxx
index 89485b5..607bb58 100644
--- a/cppuhelper/source/servicefactory_detail.hxx
+++ b/cppuhelper/source/servicefactory_detail.hxx
@@ -53,6 +53,7 @@ void add_access_control_entries(
 rtl::Bootstrap const  bootstrap)
 SAL_THROW((com::sun::star::uno::Exception));
 
+SAL_DLLPUBLIC_EXPORT
 com::sun::star::uno::Reference com::sun::star::lang::XMultiComponentFactory 
 bootstrapInitialSF(rtl::OUString const  rBootstrapPath)
 SAL_THROW((com::sun::star::uno::Exception));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cui/source dbaccess/source fpicker/source framework/inc framework/source scripting/source sfx2/inc svl/source svtools/inc svtools/source svx/source unotools/source

2012-04-20 Thread Thomas Arnhold
 cui/source/inc/acccfg.hxx  |6 -
 cui/source/inc/cfgutil.hxx |4 ---
 dbaccess/source/ui/control/sqledit.cxx |6 -
 fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx |8 
---
 fpicker/source/win32/filepicker/VistaFilePicker.hxx|8 
---
 fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx|8 
---
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx|8 
---
 fpicker/source/win32/filepicker/asyncrequests.hxx  |8 
---
 fpicker/source/win32/filepicker/vistatypes.h   |8 
---
 framework/inc/framework/preventduplicateinteraction.hxx|   10 
+
 framework/inc/framework/titlehelper.hxx|   10 
+
 framework/source/inc/accelerators/storageholder.hxx|   10 
+
 framework/source/uielement/statusbarmanager.cxx|4 ---
 scripting/source/inc/util/MiscUtils.hxx|4 +--
 scripting/source/protocolhandler/scripthandler.cxx |3 --
 scripting/source/provider/ActiveMSPList.hxx|4 +--
 scripting/source/provider/BrowseNodeFactoryImpl.hxx|4 +--
 scripting/source/provider/MasterScriptProvider.hxx |4 +--
 scripting/source/provider/MasterScriptProviderFactory.hxx  |4 +--
 scripting/source/provider/ProviderCache.hxx|4 +--
 scripting/source/provider/ScriptImpl.hxx   |5 +---
 scripting/source/provider/ScriptingContext.hxx |5 ++--
 scripting/source/provider/URIHelper.hxx|4 +--
 scripting/source/runtimemgr/ScriptNameResolverImpl.hxx |4 +--
 scripting/source/runtimemgr/ScriptRuntimeManager.hxx   |4 +--
 scripting/source/runtimemgr/StorageBridge.hxx  |4 +--
 scripting/source/runtimemgr/StorageBridgeFactory.hxx   |4 +--
 sfx2/inc/sfx2/sfxbasemodel.hxx |9 
+---
 svl/source/config/itemholder2.hxx  |   11 
--
 svtools/inc/svtools/acceleratorexecute.hxx |8 
---
 svtools/source/config/itemholder2.hxx  |   10 
-
 svx/source/inc/docrecovery.hxx |   10 
+
 unotools/source/config/itemholder1.hxx |6 -
 unotools/source/i18n/instance.hxx  |3 --
 34 files changed, 53 insertions(+), 159 deletions(-)

New commits:
commit 2abba84aa7c639011956721a4922653130dd09a6
Author: Thomas Arnhold tho...@arnhold.org
Date:   Sat Apr 21 01:30:38 2012 +0200

Replace css macro with namespace for nicer namespacing

diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index ec03c4a..1cfdc81 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -56,7 +56,7 @@
 #include sfx2/minarray.hxx
 #include cfgutil.hxx
 
-#define css ::com::sun::star
+namespace css = ::com::sun::star;
 
 class SfxMacroInfoItem;
 class SfxConfigGroupListBox_Impl;
@@ -219,10 +219,6 @@ public:
 virtual ~SvxShortcutAssignDlg();
 };
 
-
-
-#undef css
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 94c764b..4e0fd27 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -51,7 +51,7 @@ class SfxMacroInfoItem;
 struct SfxStyleInfo_Impl;
 struct SfxStylesInfo_Impl;
 
-#define css ::com::sun::star
+namespace css = ::com::sun::star;
 
 struct SfxStyleInfo_Impl
 {
@@ -203,8 +203,6 @@ public:
 voidSetStylesInfo(SfxStylesInfo_Impl* pStyles);
 };
 
-#undef css
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index 765d6a7..3161879 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -45,11 +45,7 @@
 
 #include svl/smplhint.hxx
 
-namespace {
-
-namespace css = com::sun::star;
-
-}
+namespace css = ::com::sun::star;
 
 //
 // OSqlEdit
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx 
b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
index 47909d7..ca1b223 100644
--- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
+++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
@@ -45,11 +45,7 @@
 // namespace
 //-
 
-#ifdef css
-#error