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

2013-03-23 Thread Chris Sherlock
 vcl/workben/outdevgrind.cxx |   18 --
 vcl/workben/svdem.cxx   |   12 
 vcl/workben/svpclient.cxx   |   18 --
 vcl/workben/svptest.cxx |   15 ---
 vcl/workben/vcldemo.cxx |   12 
 5 files changed, 75 deletions(-)

New commits:
commit 444afc083500c3a4c2d2010f4886df49e75b7773
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Mar 23 15:55:18 2013 +1100

General comment cleanup for demo/test vcl apps

Remove unnecessary commented out code, remove comment spacer lines,
in general tidy up this code to make it easier to read.

Change-Id: I37a19177795aa93d63f736e1933924605fbf2146
Reviewed-on: https://gerrit.libreoffice.org/2921
Reviewed-by: Tor Lillqvist t...@iki.fi
Tested-by: Tor Lillqvist t...@iki.fi

diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index bec832a..703bb00 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -78,8 +78,6 @@ class TestWindow : public Dialog
 virtual void Paint( const Rectangle rRect );
 };
 
-//--
-
 typedef boost::function1void, OutputDevice*   functor_type;
 typedef std::vector std::pairconst char*,
functor_type   functor_vector_type;
@@ -141,17 +139,6 @@ void setupMethodStubs( functor_vector_type res )
 aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) );
 aMtf.AddAction( new MetaRectAction(aRect) );
 
-/* void DrawText( const Point rStartPt, const XubString rStr,
-   xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
-   MetricVector* pVector = NULL, String* pDisplayText = NULL );
-*/
-//add(res,
-//DrawText,
-//boost::bind(
-//OutputDevice::DrawText,
-//_1,
-//aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, 
(String*)0, (vcl::ITextLayout*)0 ));
-
 /* void DrawTextArray( const Point rStartPt, const XubString rStr,
const sal_Int32* pDXAry = NULL,
xub_StrLen nIndex = 0,
@@ -792,7 +779,6 @@ void setupMethodStubs( functor_vector_type res )
 
 }
 
-//--
 
 void grindFunc( OutputDevice   rTarget,
 functor_vector_type::const_iterator iter,
@@ -815,7 +801,6 @@ void grindFunc( OutputDevice   rTarget,
  pMsg );
 }
 
-//--
 
 /** Call OutputDevice render methods repeatedly, and output elapsed
 time to stdout
@@ -879,7 +864,6 @@ void outDevGrind( OutputDevice rTarget, sal_Int32 
nTurns=100 )
 }
 }
 
-//--
 
 void TestWindow::Paint( const Rectangle )
 {
@@ -916,9 +900,7 @@ int GrindApp::Main()
 return EXIT_SUCCESS;
 }
 
-//-
 // create the global service-manager
-//-
 uno::Reference lang::XMultiServiceFactory  xFactory;
 try
 {
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 58b9836..a77bcb1 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -33,12 +33,10 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
-// ---
 
 // Forward declaration
 void Main();
 
-// ---
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -56,7 +54,6 @@ SAL_IMPLEMENT_MAIN()
 return 0;
 }
 
-// ---
 
 class MyWin : public WorkWindow
 {
@@ -72,7 +69,6 @@ public:
 voidResize();
 };
 
-// ---
 
 void Main()
 {
@@ -83,56 +79,48 @@ void Main()
 Application::Execute();
 }
 
-// ---
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
 WorkWindow( pParent, nWinStyle )
 {
 }
 
-// ---
 
 void MyWin::MouseMove( const MouseEvent rMEvt )
 {
 WorkWindow::MouseMove( rMEvt );
 }
 
-// ---
 
 void MyWin::MouseButtonDown( const MouseEvent rMEvt )
 {
 WorkWindow::MouseButtonDown( rMEvt );
 }
 
-// ---
 
 void MyWin::MouseButtonUp( const MouseEvent rMEvt )
 {
 WorkWindow::MouseButtonUp( rMEvt

Re: Leftover dmake makefiles

2013-03-24 Thread Chris Sherlock
On Fri Mar 1 02:37:38 PST 2013, Michael Stahl wrote:
 it doesn't make any sense to just remove dmake files in some directory
 and leave the code around.  maybe it needs special flags to build or
 whatever.  either remove the whole thing or leave the dmake file there
 as documentation.

I have to agree here. For example, there are two examples of how to use
vcl via svdemo and vcldemo at vcl/workben but these haven't been built for
years I believe and thus the dmake files make for great documentation.

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


Compiling vcldemo

2013-03-30 Thread Chris Sherlock
Hi all,

I'm a newbie, but have been very interested in the vcldemo that is in
vcl/workben, so I thought I'd try to get it to compile. However, I'm
struggling a bit with gbuild, and also with cppumaker.

Firstly, I have managed to get it to initially compile. What I've done
is the following:

1. Modified Repository.mk - in the call to
gb_Helper_register_executables, I have added vcldemo

2. Modified vcl/Module_vcl.mk - added Executable_demo to gb_Module_add_targets

3. Added the file vcl/Executable_demo.mk (which I copied from
Executable_ui-previewer.mk and modified accordingly). The contents of
this file are:

$(eval $(call gb_Executable_Executable,vcldemo))

$(eval $(call gb_Executable_use_static_libraries,vcldemo,\
vclmain \
))

$(eval $(call gb_Executable_use_libraries,ui-previewer,\
comphelper \
cppu \
cppuhelper \
sal \
tl \
ucbhelper \
vcl \
))

$(eval $(call gb_Executable_add_exception_objects,vcldemo,\
vcl/workben/vcldemo \
))

# vim: set noet sw=4 ts=4:

---

Now I run make vcl, only it tells me that it can't find
XMultiServiceFactory.hpp:

chris@LibreOfficeDev:~/repos/LibreOffice/core$ make vcl
cd /home/chris/repos/LibreOffice/core/vcl  /usr/bin/make -j 1 -rs
[build CMP] vcl/vcl.unx
[build CXX] vcl/workben/vcldemo.cxx
/home/chris/repos/LibreOffice/core/vcl/workben/vcldemo.cxx:23:54:
fatal error: com/sun/star/lang/XMultiServiceFactory.hpp: No such file
or directory
compilation terminated.
make[1]: *** 
[/home/chris/repos/LibreOffice/core/workdir/unxlngi6.pro/CxxObject/vcl/workben/vcldemo.o]
Error 1
make: *** [vcl] Error 2

---

Now my understanding is that I need to use cppumaker to generate the
files. I have looked at the documentation on OpenOffice.org, and I see
it is part of the UDK -
http://www.openoffice.org/udk/common/man/tools.html#cppumaker - but I
have two issues:

a. where do I find cppumaker? Where is it installed?
b. How do I invoke it to create the relevant headers?

Thanks in advance for your time!

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


Re: Compiling vcldemo

2013-03-30 Thread Chris Sherlock
Oh, also to note: these headers appear to be in the solver directory.

Chris

On Sat, Mar 30, 2013 at 9:42 PM, Chris Sherlock
chris.sherloc...@gmail.com wrote:
 Hi all,

 I'm a newbie, but have been very interested in the vcldemo that is in
 vcl/workben, so I thought I'd try to get it to compile. However, I'm
 struggling a bit with gbuild, and also with cppumaker.

 Firstly, I have managed to get it to initially compile. What I've done
 is the following:

 1. Modified Repository.mk - in the call to
 gb_Helper_register_executables, I have added vcldemo

 2. Modified vcl/Module_vcl.mk - added Executable_demo to gb_Module_add_targets

 3. Added the file vcl/Executable_demo.mk (which I copied from
 Executable_ui-previewer.mk and modified accordingly). The contents of
 this file are:

 $(eval $(call gb_Executable_Executable,vcldemo))

 $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
 vclmain \
 ))

 $(eval $(call gb_Executable_use_libraries,ui-previewer,\
 comphelper \
 cppu \
 cppuhelper \
 sal \
 tl \
 ucbhelper \
 vcl \
 ))

 $(eval $(call gb_Executable_add_exception_objects,vcldemo,\
 vcl/workben/vcldemo \
 ))

 # vim: set noet sw=4 ts=4:

 ---

 Now I run make vcl, only it tells me that it can't find
 XMultiServiceFactory.hpp:

 chris@LibreOfficeDev:~/repos/LibreOffice/core$ make vcl
 cd /home/chris/repos/LibreOffice/core/vcl  /usr/bin/make -j 1 -rs
 [build CMP] vcl/vcl.unx
 [build CXX] vcl/workben/vcldemo.cxx
 /home/chris/repos/LibreOffice/core/vcl/workben/vcldemo.cxx:23:54:
 fatal error: com/sun/star/lang/XMultiServiceFactory.hpp: No such file
 or directory
 compilation terminated.
 make[1]: *** 
 [/home/chris/repos/LibreOffice/core/workdir/unxlngi6.pro/CxxObject/vcl/workben/vcldemo.o]
 Error 1
 make: *** [vcl] Error 2

 ---

 Now my understanding is that I need to use cppumaker to generate the
 files. I have looked at the documentation on OpenOffice.org, and I see
 it is part of the UDK -
 http://www.openoffice.org/udk/common/man/tools.html#cppumaker - but I
 have two issues:

 a. where do I find cppumaker? Where is it installed?
 b. How do I invoke it to create the relevant headers?

 Thanks in advance for your time!

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


Re: Compiling vcldemo

2013-03-30 Thread Chris Sherlock
Sorry folks, worked it out by adding the following to Executable_demo.mk:

$(eval $(call gb_Executable_use_sdk_api,vcldemo))

Chris

On Sat, Mar 30, 2013 at 10:09 PM, Chris Sherlock
chris.sherloc...@gmail.com wrote:
 Oh, also to note: these headers appear to be in the solver directory.

 Chris

 On Sat, Mar 30, 2013 at 9:42 PM, Chris Sherlock
 chris.sherloc...@gmail.com wrote:
 Hi all,

 I'm a newbie, but have been very interested in the vcldemo that is in
 vcl/workben, so I thought I'd try to get it to compile. However, I'm
 struggling a bit with gbuild, and also with cppumaker.

 Firstly, I have managed to get it to initially compile. What I've done
 is the following:

 1. Modified Repository.mk - in the call to
 gb_Helper_register_executables, I have added vcldemo

 2. Modified vcl/Module_vcl.mk - added Executable_demo to 
 gb_Module_add_targets

 3. Added the file vcl/Executable_demo.mk (which I copied from
 Executable_ui-previewer.mk and modified accordingly). The contents of
 this file are:

 $(eval $(call gb_Executable_Executable,vcldemo))

 $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
 vclmain \
 ))

 $(eval $(call gb_Executable_use_libraries,ui-previewer,\
 comphelper \
 cppu \
 cppuhelper \
 sal \
 tl \
 ucbhelper \
 vcl \
 ))

 $(eval $(call gb_Executable_add_exception_objects,vcldemo,\
 vcl/workben/vcldemo \
 ))

 # vim: set noet sw=4 ts=4:

 ---

 Now I run make vcl, only it tells me that it can't find
 XMultiServiceFactory.hpp:

 chris@LibreOfficeDev:~/repos/LibreOffice/core$ make vcl
 cd /home/chris/repos/LibreOffice/core/vcl  /usr/bin/make -j 1 -rs
 [build CMP] vcl/vcl.unx
 [build CXX] vcl/workben/vcldemo.cxx
 /home/chris/repos/LibreOffice/core/vcl/workben/vcldemo.cxx:23:54:
 fatal error: com/sun/star/lang/XMultiServiceFactory.hpp: No such file
 or directory
 compilation terminated.
 make[1]: *** 
 [/home/chris/repos/LibreOffice/core/workdir/unxlngi6.pro/CxxObject/vcl/workben/vcldemo.o]
 Error 1
 make: *** [vcl] Error 2

 ---

 Now my understanding is that I need to use cppumaker to generate the
 files. I have looked at the documentation on OpenOffice.org, and I see
 it is part of the UDK -
 http://www.openoffice.org/udk/common/man/tools.html#cppumaker - but I
 have two issues:

 a. where do I find cppumaker? Where is it installed?
 b. How do I invoke it to create the relevant headers?

 Thanks in advance for your time!

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


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

2013-03-31 Thread Chris Sherlock
 sw/README |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96942af2a8dd19a14ab3cfc4635e428bd257d320
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Mar 31 20:47:59 2013 +1100

Correct typos in sw README

Change-Id: I61323685b33817a2641713455bac1a079687cb4d
Reviewed-on: https://gerrit.libreoffice.org/3131
Reviewed-by: Andras Timar ati...@suse.com
Tested-by: Andras Timar ati...@suse.com

diff --git a/sw/README b/sw/README
index 6bfac02..dd5a067 100644
--- a/sw/README
+++ b/sw/README
@@ -1,5 +1,5 @@
 Writer application code.
 
-Exakt history ist lost before Sept. 18th, 2000, but old source code
+Exact history was lost before Sept. 18th, 2000, but old source code
 comments show that Writer core dates back until at least November
 1990.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Build broken

2013-03-31 Thread Chris Sherlock
I folks, after the upgrade of icu, it appears that the build is breaking:

/usr/bin/make -j 1 -rs -f /home/chris/repos/LibreOffice/core/Makefile.gbuild
[build MOD] accessibility
[build MOD] animations
[build MOD] avmedia
[build LNK] Executable/transex3
/home/chris/repos/LibreOffice/core/solver/unxlngi6.pro/lib/libtransex.a(po.o):
In function `(anonymous namespace)::lcl_EscapeTags(rtl::OString
const)':
po.cxx:(.text+0x2697): undefined reference to
`icu_49::UnicodeString::UnicodeString(unsigned short const*, int)'
po.cxx:(.text+0x26b6): undefined reference to
`icu_49::UnicodeString::~UnicodeString()'
po.cxx:(.text+0x26d8): undefined reference to
`icu_49::UnicodeString::UnicodeString(unsigned short const*, int)'
po.cxx:(.text+0x26f7): undefined reference to
`icu_49::RegexMatcher::RegexMatcher(icu_49::UnicodeString const,
unsigned int, UErrorCode)'
po.cxx:(.text+0x270c): undefined reference to
`icu_49::RegexMatcher::reset(icu_49::UnicodeString const)'
po.cxx:(.text+0x2827): undefined reference to
`icu_49::RegexMatcher::start(UErrorCode) const'
po.cxx:(.text+0x283d): undefined reference to
`icu_49::UnicodeString::~UnicodeString()'
po.cxx:(.text+0x2855): undefined reference to
`icu_49::RegexMatcher::find(long long, UErrorCode)'
po.cxx:(.text+0x28fe): undefined reference to
`icu_49::UnicodeString::~UnicodeString()'
po.cxx:(.text+0x2914): undefined reference to
`icu_49::RegexMatcher::~RegexMatcher()'
po.cxx:(.text+0x292a): undefined reference to
`icu_49::UnicodeString::~UnicodeString()'
po.cxx:(.text+0x2bf4): undefined reference to
`icu_49::RegexMatcher::group(UErrorCode) const'
po.cxx:(.text+0x2c1c): undefined reference to
`icu_49::RegexMatcher::~RegexMatcher()'
po.cxx:(.text+0x2c2a): undefined reference to
`icu_49::UnicodeString::~UnicodeString()'
collect2: error: ld returned 1 exit status
make[1]: *** 
[/home/chris/repos/LibreOffice/core/workdir/unxlngi6.pro/LinkTarget/Executable/transex3]
Error 1
make: *** [build] Error 2

Regards,
Chris Sherlock
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-03-31 Thread Chris Sherlock
 sw/source/core/access/acccontext.cxx |4 -
 sw/source/core/access/accframe.cxx   |   58 +--
 sw/source/core/access/accfrmobjmap.cxx   |2 
 sw/source/core/access/accmap.cxx |   44 ++--
 sw/source/core/access/accnotextframe.cxx |2 
 sw/source/core/access/accpara.cxx|   31 ++
 sw/source/core/access/accportions.cxx|2 
 sw/source/core/access/accselectionhelper.cxx |4 -
 sw/source/core/access/acctable.cxx   |   26 
 sw/source/core/access/acctextframe.cxx   |6 --
 10 files changed, 81 insertions(+), 98 deletions(-)

New commits:
commit f7a3781bd6790ff9889bae9f636facfe84903140
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Mar 31 22:05:00 2013 +1100

Multiple typo fixes, small code changes

* Corrected spelling errors in comments
* In accpara.cxx, SwAccessibleParagraph::_getRunAttributesImpl had the
  if statement commented out, but the scope block remained... minor in
  the grand scheme of things, but messy code
* Some unused commented out code removed

Change-Id: Id8b29c4051c7c09a1cc555996f9e56fd4f0f3611
Reviewed-on: https://gerrit.libreoffice.org/3135
Tested-by: Thomas Arnhold tho...@arnhold.org
Reviewed-by: Thomas Arnhold tho...@arnhold.org

diff --git a/sw/source/core/access/acccontext.cxx 
b/sw/source/core/access/acccontext.cxx
index 86f9da8..80e3c4d 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -176,7 +176,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm 
*pFrm,
  rLower.AlwaysIncludeAsChild() )
 {
 // This wouldn't be required if the SwAccessibleFrame,
-// wouldn't know about the vis area.
+// wouldn't know about the visible area.
 eAction = SCROLLED;
 }
 if( NONE != eAction )
@@ -798,7 +798,7 @@ uno::Reference XAccessible  SAL_CALL 
SwAccessibleContext::getAccessibleAtPoint
 
There are two modes.
 
-   - realative
+   - relative
 
  Return bounding box relative to parent if parent is no root
  frame. Otherwise return the absolute bounding box.
diff --git a/sw/source/core/access/accframe.cxx 
b/sw/source/core/access/accframe.cxx
index c931ee6..4d4e4d7 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -40,14 +40,14 @@
 
 using namespace sw::access;
 
-// Regarding visibilily (or in terms of accessibility: regarding the showing
+// Regarding visibility (or in terms of accessibility: regarding the showing
 // state): A frame is visible and therfor contained in the tree if its frame
 // size overlaps with the visible area. The bounding box however is the
 // frame's paint area.
-/* static */ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap 
rAccMap,
- const SwRect 
rVisArea,
- const SwFrm *pFrm,
- sal_Bool 
bInPagePreview )
+sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap rAccMap,
+const SwRect rVisArea,
+const SwFrm *pFrm,
+sal_Bool bInPagePreview )
 {
 sal_Int32 nCount = 0;
 
@@ -73,12 +73,12 @@ using namespace sw::access;
 return nCount;
 }
 
-/* static */ SwAccessibleChild SwAccessibleFrame::GetChild(
-SwAccessibleMap rAccMap,
-const SwRect rVisArea,
-const SwFrm rFrm,
-sal_Int32 rPos,
-sal_Bool bInPagePreview )
+SwAccessibleChild SwAccessibleFrame::GetChild(
+   SwAccessibleMap rAccMap,
+   const SwRect rVisArea,
+   const SwFrm rFrm,
+   sal_Int32 rPos,
+   sal_Bool bInPagePreview )
 {
 SwAccessibleChild aRet;
 
@@ -111,7 +111,7 @@ using namespace sw::access;
 }
 else
 {
-// The unsorted list is sorted enough, because it return lower
+// The unsorted list is sorted enough, because it returns lower
 // frames in the correct order.
 const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
 SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
@@ -140,13 +140,13 @@ using namespace sw::access;
 return aRet;
 }
 
-/* static */ sal_Bool SwAccessibleFrame::GetChildIndex(
-SwAccessibleMap

Re: Build broken

2013-03-31 Thread Chris Sherlock
Ah... guess I should have thought of that :-)

Chris

On Sun, Mar 31, 2013 at 11:52 PM, Tor Lillqvist t...@iki.fi wrote:
 make clean helps. (if you have the patience, you can do make
 foo.clean for each module that depend on icu.)

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


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

2013-03-03 Thread Chris Sherlock
 vcl/source/app/svapp.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 2d8cb19057e81f4f3297ffac803e11c6cb84b3db
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Mar 3 15:24:09 2013 +0100

No need for commented out code.

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 3758a85..90166eb 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1493,13 +1493,7 @@ Window* Application::GetDefDialogParent()
 return NULL;
 }
 
-// MAV: before the implementation has used only decorated 
windows,
-//  but it is not true in case of ActiveX or plugin 
scenario,
-//  so this check is commented out
-// if( pWin-mpWindowImpl-mpFrameWindow-GetStyle()  
(WB_MOVEABLE | WB_SIZEABLE) )
-return pWin-mpWindowImpl-mpFrameWindow-ImplGetWindow();
-// else
-//return NULL;
+return pWin-mpWindowImpl-mpFrameWindow-ImplGetWindow();
 }
 }
 // last active application frame
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bean/com

2013-04-16 Thread Chris Sherlock
 bean/com/sun/star/comp/beans/CallWatchThread.java   |9 -
 bean/com/sun/star/comp/beans/ContainerFactory.java  |2 
 bean/com/sun/star/comp/beans/Frame.java |6 -
 bean/com/sun/star/comp/beans/JavaWindowPeerFake.java|   16 +--
 bean/com/sun/star/comp/beans/LocalOfficeConnection.java |   76 +++-
 bean/com/sun/star/comp/beans/LocalOfficeWindow.java |   16 +--
 bean/com/sun/star/comp/beans/NativeConnection.java  |6 -
 bean/com/sun/star/comp/beans/NativeService.java |2 
 bean/com/sun/star/comp/beans/NoConnectionException.java |4 
 bean/com/sun/star/comp/beans/NoDocumentException.java   |2 
 bean/com/sun/star/comp/beans/OOoBean.java   |   71 ++
 bean/com/sun/star/comp/beans/OfficeConnection.java  |4 
 bean/com/sun/star/comp/beans/OfficeWindow.java  |8 -
 bean/com/sun/star/comp/beans/Wrapper.java   |5 -
 14 files changed, 106 insertions(+), 121 deletions(-)

New commits:
commit 43debfae8326ad98f9d130aa450f59ad49577d55
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Apr 16 22:38:26 2013 +1000

General cleanup of OfficeBeans

Cleaned up Java source files:
+ removed unnecessary commented out code
+ corrected many spelling errors
+ formatting changes (remove decorations from comments,
  whitespacing, etc.)

Change-Id: I4133908ceac874b273fe409d763b3ddbfc2055e5
Reviewed-on: https://gerrit.libreoffice.org/3413
Reviewed-by: Noel Grandin noelgran...@gmail.com
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/bean/com/sun/star/comp/beans/CallWatchThread.java 
b/bean/com/sun/star/comp/beans/CallWatchThread.java
index ce6ed6a..31f3a8c 100644
--- a/bean/com/sun/star/comp/beans/CallWatchThread.java
+++ b/bean/com/sun/star/comp/beans/CallWatchThread.java
@@ -19,13 +19,12 @@
 package com.sun.star.comp.beans;
 
 
-//---
 /** Helper class to watch calls into OOo with a timeout.
  */
-//Do not add the thread instances to a threadgroup. When testing the bean in
-//an applet it turned out the ThreadGroup was in an inconsistent state
-//after navigating off the site that contains the applet and back to it.
-//That was tested with a Sun JRE 1.4.2_06
+// Do not add the thread instances to a threadgroup. When testing the bean in
+// an applet it turned out the ThreadGroup was in an inconsistent state
+// after navigating off the site that contains the applet and back to it.
+// That was tested with a Sun JRE 1.4.2_06
 public class CallWatchThread extends Thread
 {
 private static boolean DEBUG = false;
diff --git a/bean/com/sun/star/comp/beans/ContainerFactory.java 
b/bean/com/sun/star/comp/beans/ContainerFactory.java
index c707a71..d06a082 100644
--- a/bean/com/sun/star/comp/beans/ContainerFactory.java
+++ b/bean/com/sun/star/comp/beans/ContainerFactory.java
@@ -21,7 +21,7 @@ package com.sun.star.comp.beans;
 import java.awt.Container;
 
 /**
- * This interface reprecents an AWT container factory.
+ * This interface represents an AWT container factory.
  *
  * @deprecated
  *
diff --git a/bean/com/sun/star/comp/beans/Frame.java 
b/bean/com/sun/star/comp/beans/Frame.java
index cd68bb7..b14b633 100644
--- a/bean/com/sun/star/comp/beans/Frame.java
+++ b/bean/com/sun/star/comp/beans/Frame.java
@@ -49,7 +49,7 @@ public class Frame
 // com.sun.star.frame.XFrame
 //--
 
-public void initialize( /*IN*/com.sun.star.awt.XWindow xWindow )
+public void initialize( /*IN*/ com.sun.star.awt.XWindow xWindow )
 {
 xFrame.initialize( xWindow );
 }
@@ -79,7 +79,7 @@ public class Frame
 xFrame.setName( aName );
 }
 
-public com.sun.star.frame.XFrame findFrame( /*IN*/String aTargetFrameName, 
/*IN*/int nSearchFlags )
+public com.sun.star.frame.XFrame findFrame( /*IN*/ String 
aTargetFrameName, /*IN*/ int nSearchFlags )
 {
 return xFrame.findFrame( aTargetFrameName, nSearchFlags );
 }
@@ -104,7 +104,7 @@ public class Frame
 return xFrame.isActive();
 }
 
-public boolean setComponent( /*IN*/com.sun.star.awt.XWindow 
xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
+public boolean setComponent( /*IN*/ com.sun.star.awt.XWindow 
xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
 {
 return xFrame.setComponent( xComponentWindow, xController );
 }
diff --git a/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java 
b/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
index da235ff..7bcfa7a 100644
--- a/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
+++ b/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
@@ -25,7 +25,7 @@ import com.sun.star.awt.*;
  *
  * @since OOo 2.0.0
  */
-/* package */ class

Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-18 Thread Chris Sherlock
Anyone have an answer for this?

Chris


On Tue, Apr 16, 2013 at 9:39 PM, Noel Grandin n...@peralex.com wrote:

  On 2013-04-16 13:24, Chris Sherlock wrote:

   Oh. But what exactly *are* the new interfaces?

  The interfaces were deprecated in commit
 eb99e74c6248c4bc60f4191154ea18319550b28d [1] some time in 2005, the only
 reference I have to why is the cryptic comment INTEGRATION: CWS jl22
 (1.2.26); FILE MERGED

  I'd be happy to try to convert these to a new interface, but I genuinely
 don't know where to start :(


 I don't know.

 Stephan - What is the replacement interface for the deprecated Java
 interface

 http://opengrok.libreoffice.org/xref/core/bean/com/sun/star/beans/OfficeConnection.javahttp://opengrok.libreoffice.org/xref/core/bean/com/sun/star/beans/OfficeConnection.java#31
 ??

 At I guess I would say that the correct approach would be to simply drop
 the usage of com.sun.star.beans.OfficeConnection everywhere and make the
 code use com.sun.star.beans.LocalOfficeConnection directly.
 Similarly for OfficeWindow and LocaleOfficeWindow.

 But I'm not the expert, so wait for Stephan to weigh in :-)




 --
 Disclaimer: http://www.peralex.com/disclaimer.html


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


Re: Trouble creating logerrit account

2013-04-18 Thread Chris Sherlock
Wols, I think I struck this same issue when I first setup gerrit. The issue
wasn't anything to do with my ssh setup, but instead it was because I
hadn't added the ssh-keys to the gerrit account settings page!

Check that, because that is the same error I got (only I used -v, you've
gone crazy verbose there!)

Chris

https://gerrit.libreoffice.org/#/settings/ssh-keys

On Wed, 17 Apr 2013 23:27, Wols Lists wrote:


 I've just tried to set this up. Looks my my RSA keygen is screwed, but I
 don't know why. The trace from ssh - logerrit follows:

 anthony@ashdown ~/gitstuff/loffice $ ssh - logerrit
 OpenSSH_5.9p1-hpn13v11lpk, OpenSSL 1.0.1c 10 May 2012
 ...
 [snip]
 ...
 debug2: we sent a publickey packet, wait for reply
 debug1: Authentications that can continue: publickey
 debug2: we did not send a packet, disable method
 debug1: No more authentication methods to try.
 Permission denied (publickey).
 anthony@ashdown ~/gitstuff/loffice $

 It's complaining incorrect RSA1 identifier, but I generated the key
 pair as per instructions -

 ssh-keygen -t rsa -C your_em...@example.com

 The header of my private key starts

 -BEGIN RSA PRIVATE KEY-
 Proc-Type: 4,ENCRYPTED
 DEK-Info: AES-128-CBC,15DE1487A8D84D685BB525958FCEADC3


 Obviously I used my email address - only thing is I did not use my gmail
 address I logged in with, I used the email address I want to use (and I
 didn't quote it). Could that possibly be anything to do with it -
 although I don't think that error makes sense for that...

 Cheers,
 Wol

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


Calc statistical accuracy

2013-04-21 Thread Chris Sherlock
Hi all,

This is a question more from curiosity than anything.

Today I was reading that the Journal of Computational Statistics and Data
Analysis was not at all happy with Microsoft Excel 2003, stating that:

Given Microsoft’s track record, we recommend that no statistical procedure
be used unless Microsoft demonstrates that the procedure in question has
been correctly programmed, e.g., by the use of test datasets from
textbooks, or by comparison with another software package. [1]

What interests me the most is that they gave some specific advise on how to
test statistical software. In particular they stated that NIST has a
Statistical Reference Dataset that can be used to test statistical
software. [2]

I found the datasets on the NIST website [3]. They have a number of tests
for ANOVA, Linear Regressions, Markov Chain Monte Carlo, Nonlinear
Regression and Univariate Summary Statistics.

I was wondering if we've done any work on testing Calc against these
datasets?

Chris

1. http://www.pages.drexel.edu/~bdm25/excel2007.pdf
2. http://www.itl.nist.gov/div898/strd/
3. http://www.itl.nist.gov/div898/strd/general/dataarchive.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Fwd: Calc statistical accuracy

2013-04-21 Thread Chris Sherlock
On Sunday, 21 April 2013, Markus Mohrhard wrote:


 No and as long as you don't plan to work on them I doubt anyone is going
 to do it soon.


There's a friendly response... Where did you get that idea?


 Additionally as long as this mainly serves as theoretical discussion


Why do you consider this to be a theoretical discussion? Don't you feel
there is any merit in the data sets?


 I think it is off-topic here and should be moved to the discuss list.


Why is that? It's a fairly innocent enquiry.


 However if you want to work on improving Calc's statistical capabilities I
 think the best start is to think about a interface to connect it to R. I
 think we even have somewhere at some old wiki page this idea as a crazy
 idea for the future.

 Regards,
 Markus


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


Re: Calc statistical accuracy

2013-04-21 Thread Chris Sherlock
On Sunday, 21 April 2013, Markus Mohrhard wrote:



 2013/4/21 Chris Sherlock chris.sherloc...@gmail.com javascript:_e({},
 'cvml', 'chris.sherloc...@gmail.com');

 On Sunday, 21 April 2013, Markus Mohrhard wrote:


 No and as long as you don't plan to work on them I doubt anyone is going
 to do it soon.


 There's a friendly response... Where did you get that idea?


 Please understand that posting at the developer mailing list will often
 result in a response asking you to show some work in this area. This is
 part of the rule of the mailing list and if you feel uncomfortable with
 this you should move the discussion to the discuss list which is exactly
 for that case.


Understood, I only raised it because I'm interested in statistics and was
wondering if it might be worthwhile putting some effort into it. I should
have made that more clear.






 Additionally as long as this mainly serves as theoretical discussion


 Why do you consider this to be a theoretical discussion? Don't you feel
 there is any merit in the data sets?


 I never said there is no merit in these data sets but as long as nobody is
 doing the work this is a purely theoretical discussion.




 I think it is off-topic here and should be moved to the discuss list.


 Why is that? It's a fairly innocent enquiry.


 Because this is the developer mailing list where we discuss code and code
 related questions. General discussions that are not backed up by code
 should be moved to the discuss mailing list or the user mailing list.
 Please also see the general rules for the developer mailing list at
 https://wiki.documentfoundation.org/Development/Use_of_MailList


Apologies, didn't mean to break mailing list etiquette.

I'm sorry if that sounds rude but I think that discussing this without
 planning on working on it is just wasted time. If you want to work on this
 issues we are happy to provide you with some code pointers. As I already
 mentioned in my other mail IMHO the right solution is to provide an
 interface to R.


Fair enough.

Regards,
 Markus


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


Re: Clang error

2013-04-27 Thread Chris Sherlock
/accessiblecontrolcontext.o:(.data.rel.ro+0x128):
undefined reference to `non-virtual thunk to
cppu::WeakAggComponentImplHelper2com::sun::star::accessibility::XAccessibleContext,
com::sun::star::accessibility::XAccessibleEventBroadcaster::queryAggregation(com::sun::star::uno::Type
const)'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [/home/chris/repos/LibreOffice/core/workdir/
unxlngi6.pro/LinkTarget/Library/libtklo.so] Error 1
make: *** [toolkit] Error 2


Chris



On Sat, Apr 27, 2013 at 11:51 PM, Chris Sherlock chris.sherloc...@gmail.com
 wrote:

 Hi all,

 When I attempt to compile with Clang (I did a git pull), I'm getting a
 linker error:

 chris@LibreOfficeDev:~/repos/LibreOffice/core$ make toolkit
 cd /home/chris/repos/LibreOffice/core/toolkit  /usr/bin/make -j 1 -rsr
 [ SRS ] toolkit/awt
 [ RES ] tken-US
 [ LNK ] Library/libtklo.so
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxaccessiblecomponent.o:(.data.rel.ro+0x24):
 undefined reference to
 `cppu::WeakAggComponentImplHelper2com::sun::star::accessibility::XAccessibleContext,
 com::sun::star::accessibility::XAccessibleEventBroadcaster::queryAggregation(com::sun::star::uno::Type
 const)'
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxaccessiblecomponent.o:(.data.rel.ro+0xe0):
 undefined reference to `non-virtual thunk to
 cppu::WeakAggComponentImplHelper2com::sun::star::accessibility::XAccessibleContext,
 com::sun::star::accessibility::XAccessibleEventBroadcaster::queryAggregation(com::sun::star::uno::Type
 const)'
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/accessiblecontrolcontext.o:(.data.rel.ro+0xa8):
 undefined reference to
 `cppu::WeakAggComponentImplHelper2com::sun::star::accessibility::XAccessibleContext,
 com::sun::star::accessibility::XAccessibleEventBroadcaster::queryAggregation(com::sun::star::uno::Type
 const)'
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/accessiblecontrolcontext.o:(.data.rel.ro+0x128):
 undefined reference to `non-virtual thunk to
 cppu::WeakAggComponentImplHelper2com::sun::star::accessibility::XAccessibleContext,
 com::sun::star::accessibility::XAccessibleEventBroadcaster::queryAggregation(com::sun::star::uno::Type
 const)'
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 make[1]: *** [/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/LinkTarget/Library/libtklo.so] Error 1
 make: *** [toolkit] Error 2

 ---

 How do I pass in the -v flag?

 Any tips would be greatly appreciated :-)

 Chris

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


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

2013-04-27 Thread Chris Sherlock
 toolkit/source/awt/vclxaccessiblecomponent.cxx |   73 -
 1 file changed, 1 insertion(+), 72 deletions(-)

New commits:
commit 8339e063f3bb2e98b74eecd79d78c91a07992001
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Apr 28 00:24:47 2013 +1000

Remove useless commented out code.

Change-Id: Iec64115692b1f51ec1466dd57f8049c6f3aaa82b
Reviewed-on: https://gerrit.libreoffice.org/3631
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 1edab68..39e33cc 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -36,7 +36,7 @@
 #include vcl/menu.hxx
 
 #ifndef VCLEVENT_WINDOW_FRAMETITLECHANGED
-#define VCLEVENT_WINDOW_FRAMETITLECHANGED   1018// pData = XubString* = 
oldTitle
+#define VCLEVENT_WINDOW_FRAMETITLECHANGED   1018
 #endif
 
 using namespace ::com::sun::star;
@@ -46,9 +46,6 @@ using namespace ::comphelper;
 DBG_NAME(VCLXAccessibleComponent)
 
 
-//  
-//  class VCLXAccessibleComponent
-//  
 VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXindow )
 : AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() )
 , OAccessibleImplementationAccess( )
@@ -218,20 +215,6 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const 
VclWindowEvent rVclWind
 mpVCLXindow = NULL;
 }
 break;
-//
-// dont handle CHILDCREATED events here
-// they are handled separately as child events, see 
ProcessWindowChildEvent above
-//
-/*
-case VCLEVENT_WINDOW_CHILDCREATED:
-{
-Window* pWindow = (Window*) rVclWindowEvent.GetData();
-DBG_ASSERT( pWindow, VCLEVENT_WINDOW_CHILDCREATED - Window=? );
-aNewValue = pWindow-GetAccessible();
-NotifyAccessibleEvent( accessibility::AccessibleEventId::CHILD, 
aOldValue, aNewValue );
-}
-break;
-*/
 case VCLEVENT_WINDOW_CHILDDESTROYED:
 {
 Window* pWindow = (Window*) rVclWindowEvent.GetData();
@@ -243,39 +226,6 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const 
VclWindowEvent rVclWind
 }
 }
 break;
-
-//
-// show and hide will be handled as child events only and are
-// responsible for sending create/destroy events, see 
ProcessWindowChildEvent above
-//
-/*
-case VCLEVENT_WINDOW_SHOW:
-{
-aNewValue = accessibility::AccessibleStateType::VISIBLE;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-
-aNewValue = accessibility::AccessibleStateType::SHOWING;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-
-aNewValue.clear();
-aOldValue = accessibility::AccessibleStateType::INVALID;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-}
-break;
-case VCLEVENT_WINDOW_HIDE:
-{
-aOldValue = accessibility::AccessibleStateType::VISIBLE;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-
-aOldValue = accessibility::AccessibleStateType::SHOWING;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-
-aOldValue.clear();
-aNewValue = accessibility::AccessibleStateType::INVALID;
-NotifyAccessibleEvent( 
accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
-}
-break;
-*/
 case VCLEVENT_WINDOW_ACTIVATE:
 {
 // avoid notification if a child frame is already active
@@ -486,16 +436,6 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( 
utl::AccessibleStateSetHel
getAccessibleRole() == accessibility::AccessibleRole::DIALOG ) 
)  // #i18891#
 rStateSet.AddState( accessibility::AccessibleStateType::ACTIVE );
 
-// #104290# MT: This way, a ComboBox doesn't get state FOCUSED.
-// I also don't understand
-// a) why WINDOW_FIRSTCHILD is used here (which btw is a border window 
in the case of a combo box)
-// b) why HasFocus() is nout enough for a compound control
-/*
-Window* pChild = pWindow-GetWindow( WINDOW_FIRSTCHILD );
-if ( ( !pWindow-IsCompoundControl()  pWindow-HasFocus() ) ||
- ( pWindow-IsCompoundControl()  pChild  pChild-HasFocus() ) )
-rStateSet.AddState( accessibility::AccessibleStateType::FOCUSED

Re: Clang error

2013-04-27 Thread Chris Sherlock
A slightly cleaned up message:

http://pastebin.com/mu4P9rEC

Anyone have any ideas what's causing this?

Seems to be issues with the cppuhelper library.

Chris


On Sun, Apr 28, 2013 at 12:06 AM, Chris Sherlock chris.sherloc...@gmail.com
 wrote:

 Actually, just worked it out - I forced the -v to be passed in via
 autogen.sh:


 chris@LibreOfficeDev:~/repos/LibreOffice/core$ make toolkit
 cd /home/chris/repos/LibreOffice/core/toolkit  /usr/bin/make -j 1 -rsr
 [ DEP ] SRS:toolkit/awt
 [ LNK ] Library/libtklo.so
 Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
 3.0)
 Target: i386-pc-linux-gnu
 Thread model: posix
  /usr/bin/ld -z relro --hash-style=gnu --as-needed --build-id
 --eh-frame-hdr -m elf_i386 -shared -o
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/LinkTarget/Library/libtklo.so/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crti.o
 /usr/lib/gcc/i686-linux-gnu/4.6/crtbeginS.o
 -L/home/chris/repos/LibreOffice/core/solver/unxlngi6.pro/lib-L/usr/lib/gcc/i686-linux-gnu/4.6
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu
 -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../.. -L/lib/i386-linux-gnu -L/lib
 -L/usr/lib/i386-linux-gnu -L/usr/lib -z noexecstack -z origin -rpath
 \$ORIGIN:\$ORIGIN/../ure-link/lib -rpath-link
 /home/chris/repos/LibreOffice/core/solver/unxlngi6.pro/lib -z defs
 -rpath-link /lib:/usr/lib -z combreloc --hash-style=gnu
 --dynamic-list-cpp-new --dynamic-list-cpp-typeinfo -Bsymbolic-functions -O1
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/asynccallback.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/stylesettings.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/scrollabledialog.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxaccessiblecomponent.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxbitmap.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxcontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxdevice.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxfont.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxgraphics.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxmenu.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxpointer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxprinter.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxregion.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxspinbutton.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxsystemdependentwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtabpagecontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/animatedimagespeer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtoolkit.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtopwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindow1.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindows.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/xsimpleanimation.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/xthrobber.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/accessiblecontrolcontext.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/controlmodelcontainerbase.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/dialogcontrol.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/eventcontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/formattedcontrol.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/geometrycontrolmodel.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/grid/defaultgridcolumnmodel.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/grid/defaultgriddatamodel.o/home/chris/repos/LibreOffice

Re: Clang error

2013-04-28 Thread Chris Sherlock
I apologize for spamming up the list. I just realized - I've installed the
wrong version of Clang.

Chris


On Sun, Apr 28, 2013 at 1:16 AM, Chris Sherlock
chris.sherloc...@gmail.comwrote:

 A slightly cleaned up message:

 http://pastebin.com/mu4P9rEC

 Anyone have any ideas what's causing this?

 Seems to be issues with the cppuhelper library.

 Chris


 On Sun, Apr 28, 2013 at 12:06 AM, Chris Sherlock 
 chris.sherloc...@gmail.com wrote:

 Actually, just worked it out - I forced the -v to be passed in via
 autogen.sh:


 chris@LibreOfficeDev:~/repos/LibreOffice/core$ make toolkit
 cd /home/chris/repos/LibreOffice/core/toolkit  /usr/bin/make -j 1 -rsr
 [ DEP ] SRS:toolkit/awt
 [ LNK ] Library/libtklo.so
 Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
 3.0)
 Target: i386-pc-linux-gnu
 Thread model: posix
  /usr/bin/ld -z relro --hash-style=gnu --as-needed --build-id
 --eh-frame-hdr -m elf_i386 -shared -o
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/LinkTarget/Library/libtklo.so/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crti.o
 /usr/lib/gcc/i686-linux-gnu/4.6/crtbeginS.o
 -L/home/chris/repos/LibreOffice/core/solver/unxlngi6.pro/lib-L/usr/lib/gcc/i686-linux-gnu/4.6
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu
 -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu
 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../.. -L/lib/i386-linux-gnu -L/lib
 -L/usr/lib/i386-linux-gnu -L/usr/lib -z noexecstack -z origin -rpath
 \$ORIGIN:\$ORIGIN/../ure-link/lib -rpath-link
 /home/chris/repos/LibreOffice/core/solver/unxlngi6.pro/lib -z defs
 -rpath-link /lib:/usr/lib -z combreloc --hash-style=gnu
 --dynamic-list-cpp-new --dynamic-list-cpp-typeinfo -Bsymbolic-functions -O1
 /home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/asynccallback.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/stylesettings.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/scrollabledialog.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxaccessiblecomponent.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxbitmap.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxcontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxdevice.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxfont.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxgraphics.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxmenu.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxpointer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxprinter.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxregion.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxspinbutton.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxsystemdependentwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtabpagecontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/animatedimagespeer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtoolkit.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxtopwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindow.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindow1.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/vclxwindows.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/xsimpleanimation.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/awt/xthrobber.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/accessiblecontrolcontext.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/controlmodelcontainerbase.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/dialogcontrol.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/eventcontainer.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/formattedcontrol.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit/source/controls/geometrycontrolmodel.o/home/chris/repos/LibreOffice/core/workdir/
 unxlngi6.pro/CxxObject/toolkit

sd_regression_test failed

2013-04-30 Thread Chris Sherlock
Hi all,

I got the following unit test failure:

sd_regress_test failed:

[ CUT ] sd_regression_test
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.help.XMLHelp.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.help.XMLHelp.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.help.XMLHelp.
warn:sfx2.bastyp:22656:1:sfx2/source/bastyp/helper.cxx:119:
GetResultSet: Any other exception: Unable to create Content!
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
warn:legacy.osl:22656:1:ucb/source/core/provprox.cxx:384:
UcbContentProviderProxy::getContentProvider - No provider for
'com.sun.star.ucb.FileContentProvider.
OK (2)
This used to be an assertion failure: Desktop disposed before terminating it,
but nothing bad seems to happen anyway?
This used to be an assertion failure: Desktop not terminated before
being destructed,
but it is probably not a real problem.
This used to be an assertion failure: Desktop disposed before terminating it,
but nothing bad seems to happen anyway?
This used to be an assertion failure: Desktop not terminated before
being destructed,
but it is probably not a real problem.
warn:legacy.osl:22656:1:unotools/source/config/configmgr.cxx:185:
OSL_ASSERT: items_.empty()
warn:legacy.osl:22656:3:sal/rtl/strtmpl.cxx:1226: OSL_ASSERT: *ppThis != NULL
Segmentation fault (core dumped)

Error: a unit test failed, please do one of:

export DEBUGCPPUNIT=TRUE# for exception catching
export GDBCPPUNITTRACE=gdb --args # for interactive debugging
export VALGRIND=memcheck# for memory checking
and retry.

It looks like 
/home/chris/repos/LibreOffice/core/solver/unxlngi6/bin/cppunit/cppunittester
generated a core file at
/home/chris/repos/LibreOffice/core/workdir/unxlngi6/CppunitTest/sd_uimpress.test.core/core
Backtraces:
[New LWP 22659]
[New LWP 22660]
[New LWP 22656]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/i386-linux-gnu/libthread_db.so.1.

---

I have loaded up the coredump in gdb and done a backtrace:

chris@LibreOfficeDev:~/repos/LibreOffice/core/workdir/unxlngi6/CppunitTest/sd_uimpress.test.core$
gdb /home/chris/repos/LibreOffice/core/solver/unxlngi6/bin/cppunit/cppunittester
core
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from
/home/chris/repos/LibreOffice/core/solver/unxlngi6/bin/cppunit/cppunittester...done.
[New LWP 22659]
[New LWP 22660]
[New LWP 22656]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/i386-linux-gnu/libthread_db.so.1.
Core was generated by
`/home/chris/repos/LibreOffice/core/solver/unxlngi6/bin/cppunit/cppunittester
/h'.
Program terminated with signal 11, Segmentation fault.
#0  0x40082011 in rtl_string_newFromStr (ppThis=0x4e6ffdb8,
pCharStr=0x43a8b90d org.bluez) at
/home/chris/repos/LibreOffice/core/sal/rtl/strtmpl.cxx:1230
1230*pBuffer = *pCharStr;
(gdb) where
#0  0x40082011 in rtl_string_newFromStr (ppThis=0x4e6ffdb8,
pCharStr=0x43a8b90d org.bluez) at
/home/chris/repos/LibreOffice/core/sal/rtl/strtmpl.cxx:1230
#1  0x433898ab in rtl::OString::OStringchar const* (this=0x4e6ffdb8,
value=@0x4e6ffb84: 0x43a8b90d org.bluez) at
/home/chris/repos/LibreOffice/core/include/rtl/string.hxx:172
#2  0x43387b83 in rtl::OString::OStringchar const* (this=0x4e6ffdb8,
value=@0x4e6ffb84: 0x43a8b90d org.bluez) at
/home/chris/repos/LibreOffice/core/include/rtl/string.hxx:173
#3  0x439fa8ad in DBusObject::DBusObject (this=0x4e6ffdb8,
pBusName=0x43a8b90d org.bluez, 

Re: sd_regression_test failed

2013-04-30 Thread Chris Sherlock
My issue was as Markus stated - I had run out of memory.

Chris


On Wed, May 1, 2013 at 2:50 AM, Samuel Mehrbrodt s.mehrbr...@gmail.comwrote:

 I have no idea about the build process, but I got a similiar error today,
 somewhere in an sw test.
 'make clean' helped, now the build is successful.

 Samuel

 Am 30.04.2013 11:59, schrieb Chris Sherlock:

  Hi all,

 I got the following unit test failure:

 sd_regress_test failed:


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


[Libreoffice-commits] core.git: cppcanvas/source include/sal

2013-05-02 Thread Chris Sherlock
 cppcanvas/source/mtfrenderer/implrenderer.cxx |   18 ++
 include/sal/log-areas.dox |1 +
 include/sal/log.hxx   |2 +-
 3 files changed, 8 insertions(+), 13 deletions(-)

New commits:
commit af41ad9b9473b782b50828b7e77ff23f30007c60
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 2 02:05:46 2013 +1000

Convert from EMFP_DEBUG to SAL_INFO

* Change to SAL_INFO instead of EMFP_DEBUG in implrenderer.cxx
* Add new log area cppcanvas.emf
* Update comment in log.hxx to reference the new location of log-areas.dox

Change-Id: I5d710725339f58a111a2f3494c3a72f685624322
Reviewed-on: https://gerrit.libreoffice.org/3726
Reviewed-by: Tor Lillqvist t...@iki.fi
Tested-by: Tor Lillqvist t...@iki.fi

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 6d355a8..635a5fb 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -81,12 +81,6 @@
 #include outdevstate.hxx
 #include basegfx/matrix/b2dhommatrixtools.hxx
 
-#if OSL_DEBUG_LEVEL  1
-#define EMFP_DEBUG(x) x
-#else
-#define EMFP_DEBUG(x)
-#endif
-
 using namespace ::com::sun::star;
 
 
@@ -1326,7 +1320,7 @@ namespace cppcanvas
 // - SetFont to process font metric specific actions
 pCurrAct-Execute( rVDev );
 
-EMFP_DEBUG(printf(MTF\trecord type: 0x%x (%d)\n, 
pCurrAct-GetType(), pCurrAct-GetType()));
+SAL_INFO(cppcanvas.emf, MTF\trecord type: 0x  
pCurrAct-GetType()   (  pCurrAct-GetType()  ));
 
 switch( pCurrAct-GetType() )
 {
@@ -1834,22 +1828,22 @@ namespace cppcanvas
 count = 0;
 if (char *env = getenv (EMF_PLUS_LIMIT)) {
 limit = atoi (env);
-EMFP_DEBUG (printf (EMF+ records limit: 
%d\n, limit));
+SAL_INFO (cppcanvas.emf, EMF+ records 
limit:   limit);
 }
 }
-EMFP_DEBUG (printf (EMF+ passed to canvas mtf 
renderer, size: %u\n, (unsigned int)pAct-GetDataSize ()));
+SAL_INFO (cppcanvas.emf, EMF+ passed to canvas 
mtf renderer, size:   pAct-GetDataSize ());
 if (count  limit)
 processEMFPlus( pAct, rFactoryParms, 
rStates.getState(), rCanvas );
 count ++;
 } else if( 
pAct-GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM(EMF_PLUS_HEADER_INFO)) 
) {
-EMFP_DEBUG (printf (EMF+ passed to canvas mtf 
renderer - header info, size: %u\n, (unsigned int)pAct-GetDataSize ()));
+SAL_INFO (cppcanvas.emf, EMF+ passed to canvas 
mtf renderer - header info, size:   pAct-GetDataSize ());
 
 SvMemoryStream rMF ((void*) pAct-GetData (), 
pAct-GetDataSize (), STREAM_READ);
 
 rMF  nFrameLeft  nFrameTop  nFrameRight  
nFrameBottom;
-EMFP_DEBUG (printf (EMF+ picture frame: %d,%d - 
%d,%d\n, (int)nFrameLeft, (int)nFrameTop, (int)nFrameRight, 
(int)nFrameBottom));
+SAL_INFO (cppcanvas.emf, EMF+ picture frame:  
 nFrameLeft  ,  nFrameTop   -   nFrameRight  ,  
nFrameBottom);
 rMF  nPixX  nPixY  nMmX  nMmY;
-EMFP_DEBUG (printf (EMF+ ref device pixel size: 
%dx%d mm size: %dx%d\n, (int)nPixX, (int)nPixY, (int)nMmX, (int)nMmY));
+SAL_INFO (cppcanvas.emf, EMF+ ref device pixel 
size:   nPixX  x  nPixY   mm size:   nMmX  x  nMmY);
 
 rMF  aBaseTransform;
 //aWorldTransform.Set (aBaseTransform);
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 44549e7..5f9039d 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -330,6 +330,7 @@ certain functionality.
 @li @c comphelper
 @li @c configmgr
 @li @c cppcanvas
+@li @c cppcanvas.emf
 @li @c cppuhelper
 @li @c cppu
 @li @c forms
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 6eae1b5..80721d0 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -203,7 +203,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const ) {
 @endverbatim
 
 For a list of areas used see @ref sal_log_areas SAL debug areas. Whenever
-you use a new log area, add it to the file sal/inc/sal/log-areas.dox .
+you use a new log area, add it to the file include/sal/log-areas.dox .
 
 Whether these macros generate any log output is controlled in a two-stage
 process.
___
Libreoffice-commits mailing list

Re: Killing the gerrit to dev-list spam ...

2013-05-04 Thread Chris Sherlock
On Thu, 2 May 2013 18:49:30 +0200, Bjoern Michaelsen 
bjoern.michael...@canonical.com wrote:
 so collecting the feedback so far, here is a proposal:

 - move the gerrit mails to a separate list
  - since we now have an opt-in channel, we also mail about comments to
changes
on that list, not only if there is a new proposal
 - in addition, aim for a daily digest to the dev-list

Can we take into account that some people read the dev mailing list via the
digest?

I'm not sure why discussing patches would be precluded from the dev ML,
surely someone just says In relation to gerrit change xxx, I would like to
mention etc. etc.

Those who watch the gerrit changes will subscribe to the ML for that, and
then bring forward discussion to the dev list for patches, etc.

Incidentally, I don't really mind either way myself, but I'm really a
newbie to the list and to LO code anyway.

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


Some gerrit love

2013-04-02 Thread Chris Sherlock
Hi folks,

Anyone able to give the following some love?

https://gerrit.libreoffice.org/#/c/2928/

Seems quite useful.

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


Re: Redland - Build error in Ubuntu 12.10 x86

2013-04-05 Thread Chris Sherlock
 On Wed, 2013-04-03 at 14:45 -0300, Marcos Souza wrote:
 Hi guys,


 In master , I'm getting this error:

 /home/marcos/gitroot/core/solver/unxlngi6/inc/external/rasqal.h:672:81: 
 error: unknown type name 'raptor_message_handler'
 /home/marcos/gitroot/core/solver/unxlngi6/inc/external/rasqal.h:674:75: 
 error: unknown type name 'raptor_message_handler'

 Try...
 rm /home/marcos/gitroot/core/solver/unxlngi6/inc/external/rasqal.h
 and make again.

 C.

What is the reason why this is needed though?

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


Re: eyecandy: color for builds on interactive shells

2013-04-05 Thread Chris Sherlock
Bjoern, that's awesome! Thanks so much - I've implemented this on my
Linux environment already, and it works a treat.

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


Unusual warnings

2013-04-05 Thread Chris Sherlock
Hi all,

I've noticed the following lines during a build of LibreOffice:

[ AUD ] CustomTarget/odk/odkcommon/docs/common/ref/module-ix.html
Warning: Invalid line nr. 176 in DevelopersGuide reference file:
com.sun.star.style.ConditionalParagraphStyle

Warning: Invalid line nr. 1132 in DevelopersGuide reference file:
com.sun.star.test.XTestDialogHandler

Warning: Invalid line nr. 3040 in DevelopersGuide reference file:
com.sun.star.model.OfficeDocument

---

Anybody know what causes this?

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


[Libreoffice-commits] core.git: solenv/gbuild

2013-04-05 Thread Chris Sherlock
 solenv/gbuild/Deliver.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b558d4bb8372cf65ca343f191d672b1484a6fd13
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri Apr 5 16:28:35 2013 +1100

Missing word if in Deliver.mk

Small change to comment - missing word if in Deliver.mk for
gb_Deliver_CLEARONDELIVERY

Change-Id: I9b98da880d6fc949d831343b76124aa7c8c7cc62
Reviewed-on: https://gerrit.libreoffice.org/3205
Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com
Tested-by: Björn Michaelsen bjoern.michael...@canonical.com

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index febc6aa..de47b2b 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -29,8 +29,8 @@
 gb_Deliver_GNUCOPY := $(GNUCOPY)
 
 # if ($true) then old files will get removed from the target location before
-# they are copied there. In multi-user environments, this is needed you need to
-# be the owner of the target file to be able to modify timestamps
+# they are copied there. In multi-user environments, if this is needed you need
+# to be the owner of the target file to be able to modify timestamps
 ifeq ($(strip gb_Deliver_HARDLINK),)
 gb_Deliver_CLEARONDELIVER := $(false)
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: cliureversion.mk not found build problem

2013-04-05 Thread Chris Sherlock
Where did you get the package from?

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


[Libreoffice-commits] core.git: tools/inc

2013-04-07 Thread Chris Sherlock
 tools/inc/tools/resmgr.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Apr 7 09:43:18 2013 +1000

Typo in comment in resmgr.hxx

Change-Id: I6378c79f77ab897bf5a4e39c00944037beeef328
Reviewed-on: https://gerrit.libreoffice.org/3220
Reviewed-by: Andras Timar ati...@suse.com
Tested-by: Andras Timar ati...@suse.com

diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx
index 2fc6cf5..3b500b9 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -152,7 +152,7 @@ public:
 /// Free resource context
 voidPopContext( const Resource* = NULL );
 
-/// Incremet resource pointer
+/// Increment resource pointer
 void*   Increment( sal_uInt32 nSize );
 
 /// Size of an object within the resource
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: codemaker/README

2013-04-09 Thread Chris Sherlock
 codemaker/README |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dd88ed87a5806789264b6f9ef5d45d0474c9b6cc
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Apr 9 21:13:24 2013 +1000

Update README to explain what codemaker does

README change adapted from
http://wiki.openoffice.org/wiki/Uno/Binary/Modules/codemaker

Change-Id: I25c1e7012f7d27c21124cac171f3b15e989b8612
Reviewed-on: https://gerrit.libreoffice.org/3287
Reviewed-by: Tomáš Chvátal tchva...@suse.cz
Tested-by: Tomáš Chvátal tchva...@suse.cz

diff --git a/codemaker/README b/codemaker/README
index 5386780..d7af167 100644
--- a/codemaker/README
+++ b/codemaker/README
@@ -3,6 +3,7 @@ UNO interface declaration/stub generators for:
   the UNO API C++ binding
 - Java: javamaker generates class files that provide the JVM UNO API binding
 - the one for .Net is in module cli_ure
+- The codemaker module holds the language dependent type generators for C++ 
and Java.
 
 Note the different terminology used by cppumaker vs. gbuild for the
 three variants that can be generated by cppumaker for some of the
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Missing extensions in build?

2013-04-14 Thread Chris Sherlock
Hi folks,

When I run make dev-install, I'm noticing the following:

Couldn't find '/home/chris/repos/LibreOffice/core/solver/
unxlngi6.pro/installation/opt/URE/bin': skipping
Couldn't find '/home/chris/repos/LibreOffice/core/solver/
unxlngi6.pro/installation/opt/share/extensions/presenter-screen': skipping
Couldn't find '/home/chris/repos/LibreOffice/core/solver/
unxlngi6.pro/installation/opt/share/extensions/nlpsolver': skipping
Couldn't find '/home/chris/repos/LibreOffice/core/solver/
unxlngi6.pro/installation/opt/share/extensions/pdf-import': skipping
Couldn't find '/home/chris/repos/LibreOffice/core/solver/
unxlngi6.pro/installation/opt/share/extensions/wiki-publisher': skipping

Any ideas what might be causing this?

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


[Libreoffice-commits] core.git: solenv/gbuild

2013-04-15 Thread Chris Sherlock
 solenv/gbuild/gbuild.help.txt |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b9233625b411f051fc0b777951925f2b98666844
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 15 20:43:41 2013 +1000

Degugging no more in make help :-)

Change-Id: I032f9737746b39047b2d62df6821da4b3b9e9242
Reviewed-on: https://gerrit.libreoffice.org/3395
Reviewed-by: Joren De Cuyper joren.libreoff...@telenet.be
Reviewed-by: Jan Holesovsky ke...@suse.cz
Tested-by: Jan Holesovsky ke...@suse.cz

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 43076d6..776aeb1 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -94,10 +94,10 @@ INTERACTIVE VARIABLES:
(Note that levels higher than 2 are used only by 
obsolete debugging
features. Use SAL_INFO/SAL_WARN with a specific area 
for extra debug
output in new code.)
-   2 = degugging information + no optimizations + extra
+   2 = debugging information + no optimizations + extra
debug output. OSL_TRACE starts being active on this
level.
-   3... = degugging information + no optimizations + extra
+   3... = debugging information + no optimizations + extra
   debug output (usually extremely verbose). Levels
2 are not used very much.
TIMELOG / timelog
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-16 Thread Chris Sherlock
Hi all,

Noel makes a good point (my initial was totally wrong - not sure why I
wrote what I wrote - kids screaming in the background, sorry).

I'm a bit curious about the deprecation warnings: LocalOfficeConnection is
being derived from a deprecated class, but is not itself deprecated. I'm a
but confused how this makes any sense?

Does anyone know the reasoning here? I assumed that LocalOfficeConnection
was deprecated also because of it, but for some reason wasn't being marked
as such either :(

Chris


On Tue, Apr 16, 2013 at 8:14 PM, Noel Grandin (via Code Review) 
ger...@gerrit.libreoffice.org wrote:

 Noel Grandin has posted comments on this change.

 Change subject: Deprecated warnings disabled for Office Beans.
 ..


 Patch Set 1: This need some tweaks before it is merged

 Your commit message doesn't make sense - the classes using the deprecated
 classes are not themselves marked as deprecated.

 If they were, the warnings would not be there.

 For example, if  LocalOfficeConnection was marked @deprecated, then you
 would not need the @SuppressWarnings.

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

 Gerrit-MessageType: comment
 Gerrit-Change-Id: Ic49101f362dbff33afba63fb96b36ae88d3633f5
 Gerrit-PatchSet: 1
 Gerrit-Project: core
 Gerrit-Branch: master
 Gerrit-Owner: Chris Sherlock chris.sherloc...@gmail.com
 Gerrit-Reviewer: Noel Grandin noelgran...@gmail.com

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


Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-16 Thread Chris Sherlock
Oh. But what exactly *are* the new interfaces?

The interfaces were deprecated in commit
eb99e74c6248c4bc60f4191154ea18319550b28d [1] some time in 2005, the only
reference I have to why is the cryptic comment INTEGRATION: CWS jl22
(1.2.26); FILE MERGED

I'd be happy to try to convert these to a new interface, but I genuinely
don't know where to start :(

Chris

1.
http://cgit.freedesktop.org/libreoffice/core/commit/bean/com/sun/star/comp/beans/OfficeConnection.java?id=eb99e74c6248c4bc60f4191154ea18319550b28d


On Tue, Apr 16, 2013 at 8:50 PM, Noel Grandin n...@peralex.com wrote:

 On 2013-04-16 12:26, Chris Sherlock wrote:


 I'm a bit curious about the deprecation warnings: LocalOfficeConnection
 is being derived from a deprecated class, but is not itself deprecated. I'm
 a but confused how this makes any sense?



 The Java stuff needs an awful lot of TLC. I started doing some work there
 before being side-tracked by UNO stuff.

 What is supposed to happen is that the classes that use the deprecated
 interfaces should be rewritten to use the new interfaces, whatever those
 are.

 But nobody has gotten around to it yet, hint hint :-)


 Disclaimer: 
 http://www.peralex.com/**disclaimer.htmlhttp://www.peralex.com/disclaimer.html



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


Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-16 Thread Chris Sherlock
And even less helpful is the bug that is referenced...

All it states is:

If there are several instances of OOoBean running in one process and
stopOOoConnecition is called on one instance then all other instances do
not work anymore.

Then nothing... and the interfaces are deprecated. Great.

https://issues.apache.org/ooo/show_bug.cgi?id=51343

Chris


On Tue, Apr 16, 2013 at 9:24 PM, Chris Sherlock
chris.sherloc...@gmail.comwrote:

 Oh. But what exactly *are* the new interfaces?

 The interfaces were deprecated in commit
 eb99e74c6248c4bc60f4191154ea18319550b28d [1] some time in 2005, the only
 reference I have to why is the cryptic comment INTEGRATION: CWS jl22
 (1.2.26); FILE MERGED

 I'd be happy to try to convert these to a new interface, but I genuinely
 don't know where to start :(

 Chris

 1.
 http://cgit.freedesktop.org/libreoffice/core/commit/bean/com/sun/star/comp/beans/OfficeConnection.java?id=eb99e74c6248c4bc60f4191154ea18319550b28d


 On Tue, Apr 16, 2013 at 8:50 PM, Noel Grandin n...@peralex.com wrote:

 On 2013-04-16 12:26, Chris Sherlock wrote:


 I'm a bit curious about the deprecation warnings: LocalOfficeConnection
 is being derived from a deprecated class, but is not itself deprecated. I'm
 a but confused how this makes any sense?



 The Java stuff needs an awful lot of TLC. I started doing some work there
 before being side-tracked by UNO stuff.

 What is supposed to happen is that the classes that use the deprecated
 interfaces should be rewritten to use the new interfaces, whatever those
 are.

 But nobody has gotten around to it yet, hint hint :-)


 Disclaimer: 
 http://www.peralex.com/**disclaimer.htmlhttp://www.peralex.com/disclaimer.html




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


Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-16 Thread Chris Sherlock
Also OfficeWindow :-)

Chris


On Tue, Apr 16, 2013 at 9:39 PM, Noel Grandin n...@peralex.com wrote:

  On 2013-04-16 13:24, Chris Sherlock wrote:

   Oh. But what exactly *are* the new interfaces?

  The interfaces were deprecated in commit
 eb99e74c6248c4bc60f4191154ea18319550b28d [1] some time in 2005, the only
 reference I have to why is the cryptic comment INTEGRATION: CWS jl22
 (1.2.26); FILE MERGED

  I'd be happy to try to convert these to a new interface, but I genuinely
 don't know where to start :(


 I don't know.

 Stephan - What is the replacement interface for the deprecated Java
 interface

 http://opengrok.libreoffice.org/xref/core/bean/com/sun/star/beans/OfficeConnection.javahttp://opengrok.libreoffice.org/xref/core/bean/com/sun/star/beans/OfficeConnection.java#31
 ??

 At I guess I would say that the correct approach would be to simply drop
 the usage of com.sun.star.beans.OfficeConnection everywhere and make the
 code use com.sun.star.beans.LocalOfficeConnection directly.
 Similarly for OfficeWindow and LocaleOfficeWindow.

 But I'm not the expert, so wait for Stephan to weigh in :-)




 --
 Disclaimer: http://www.peralex.com/disclaimer.html


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


Re: [comment] Deprecated warnings disabled for Office Beans.

2013-04-16 Thread Chris Sherlock
On Tue, Apr 16, 2013 at 9:39 PM, Noel Grandin n...@peralex.com wrote:

  At I guess I would say that the correct approach would be to simply drop
 the usage of com.sun.star.beans.OfficeConnection everywhere and make the
 code use com.sun.star.beans.LocalOfficeConnection directly.
 Similarly for OfficeWindow and LocaleOfficeWindow.


I'm not entirely certain that would be a good idea. OfficeWindow is an
interface, whereas LocalOfficeWindow is a concrete class that implements
the interface.

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


Re: [comment] General cleanup of OfficeBeans

2013-04-16 Thread Chris Sherlock
Sorry for spamming up the list here... but somehow (heavens only knows how)
I've managed to add helpcontent2 into the commit.

I've made things worse by deleting the submodule, and that's never going to
fly.

How do I fix this?

Thanks any kind person who is willing to help me with this one... :-)

Chris


On Tue, Apr 16, 2013 at 11:04 PM, Noel Grandin (via Code Review) 
ger...@gerrit.libreoffice.org wrote:

 Noel Grandin has posted comments on this change.

 Change subject: General cleanup of OfficeBeans
 ..


 Patch Set 4: This need some tweaks before it is merged

 All looks good, except that you accidentally modified the helpcontent2
 submodule :-)

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

 Gerrit-MessageType: comment
 Gerrit-Change-Id: I4133908ceac874b273fe409d763b3ddbfc2055e5
 Gerrit-PatchSet: 4
 Gerrit-Project: core
 Gerrit-Branch: master
 Gerrit-Owner: Chris Sherlock chris.sherloc...@gmail.com
 Gerrit-Reviewer: Chris Sherlock chris.sherloc...@gmail.com
 Gerrit-Reviewer: Noel Grandin noelgran...@gmail.com

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


Re: [comment] General cleanup of OfficeBeans

2013-04-16 Thread Chris Sherlock
Ah... all good.

git checkout HEAD~ helpcontent2
git commit --amend helpcontent2

Pushed it back, all resolved. Thanks to those on IRC :-)

Chris


On Tue, Apr 16, 2013 at 11:24 PM, Chris Sherlock chris.sherloc...@gmail.com
 wrote:

 Sorry for spamming up the list here... but somehow (heavens only knows
 how) I've managed to add helpcontent2 into the commit.

 I've made things worse by deleting the submodule, and that's never going
 to fly.

 How do I fix this?

 Thanks any kind person who is willing to help me with this one... :-)

 Chris


 On Tue, Apr 16, 2013 at 11:04 PM, Noel Grandin (via Code Review) 
 ger...@gerrit.libreoffice.org wrote:

 Noel Grandin has posted comments on this change.

 Change subject: General cleanup of OfficeBeans
 ..


 Patch Set 4: This need some tweaks before it is merged

 All looks good, except that you accidentally modified the helpcontent2
 submodule :-)

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

 Gerrit-MessageType: comment
 Gerrit-Change-Id: I4133908ceac874b273fe409d763b3ddbfc2055e5
 Gerrit-PatchSet: 4
 Gerrit-Project: core
 Gerrit-Branch: master
 Gerrit-Owner: Chris Sherlock chris.sherloc...@gmail.com
 Gerrit-Reviewer: Chris Sherlock chris.sherloc...@gmail.com
 Gerrit-Reviewer: Noel Grandin noelgran...@gmail.com



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


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

2013-05-10 Thread Chris Sherlock
 include/sal/log-areas.dox|1 
 vcl/source/filter/wmf/enhwmf.cxx |  109 +++
 2 files changed, 78 insertions(+), 32 deletions(-)

New commits:
commit 8f0d943366f591db9142b6a9ffd9cd52b0652cbb
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 10 19:13:12 2013 +1000

Enhancements to VCL metafile handling

* Remove EMFP_DEBUG with OSL_DEBUG conditional defines and SAL_INFO
* While we are about it, to help with troubleshooting metafile
  issues, add another vcl.emf area to log-areas.dox
* Improve error handling when processing an EMF header:
+ replace variable name nsal_uInt32 (!!) with sane variables
  to make the code more readable
+ check to ensure that type field is 0x1, which is all it can be
  for metafiles
+ check that signature field is set to ASCII-encoded value FME
+ loose check of version field to see if it is 0x0001
+ warn if record count is zero - that really shouldn't be possible
+ check bytes field in header to make sure it correlates to the
  actual size of the metafile
+ additional check - [MS-EMF] states that reserved field should be
  zero, and ignored... but we can use this to check for file
  corruption - not 0, not correct!
* Quite a few more comments in the code to clarify the intended
  structure of a metafile, per [MS-EMF] documentation

Change-Id: Id4ed486b2dd0c6e7bdee67cb344aaaf8e8d98f84
Reviewed-on: https://gerrit.libreoffice.org/3839
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 693450b..cf1f1cc 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -260,6 +260,7 @@ certain functionality.
 @li @c vcl.atsui - ATSUI (obsolete) -using code for Mac OS X
 @li @c vcl.control
 @li @c vcl.coretext - CoreText-using code for Mac OS X and iOS
+@li @c vcl.emf - EMF/EMF+ processing
 @li @c vcl.fonts - font-specific code
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
 @li @c vcl.gtk - Gtk+ 2/3 plugin
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index cd71a6b..9857c4c 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -151,12 +151,6 @@ using namespace std;
 #define EMR_SETLINKEDUFIS  119
 #define EMR_SETTEXTJUSTIFICATION   120
 
-#if OSL_DEBUG_LEVEL  1
-#define EMFP_DEBUG(x) x
-#else
-#define EMFP_DEBUG(x)
-#endif
-
 
 #ifdef OSL_BIGENDIAN
 // currently unused
@@ -226,24 +220,27 @@ static sal_Bool ImplReadRegion( PolyPolygon rPolyPoly, 
SvStream rSt, sal_uInt3
 return bOk;
 }
 
-EMFP_DEBUG(void dumpWords( SvStream s, int i )
+#if OSL_DEBUG_LEVEL  1
+void dumpWords( SvStream s, int i )
 {
 sal_uInt32 pos = s.Tell();
 sal_Int16 data;
 for( ; i  0; i -- ) {
 s  data;
-EMFP_DEBUG(printf (\t\t\tdata: %04hx\n, data));
+SAL_INFO(vcl.emf, \t\t\tdata:   std::hex  data  std::dec);
 }
 s.Seek (pos);
-});
+};
+#endif
 
 void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool bHaveDC)
 {
 if (!bEMFPlus) {
 pOut-PassEMFPlusHeaderInfo();
 
+#if OSL_DEBUG_LEVEL  1
 // debug code - write the stream to debug file /tmp/emf-stream.emf
-EMFP_DEBUG(int pos = pWMF-Tell();
+int pos = pWMF-Tell();
 pWMF-Seek(0);
 SvFileStream file( OUString( /tmp/emf-stream.emf ), STREAM_WRITE | 
STREAM_TRUNC );
 
@@ -251,7 +248,9 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, 
sal_Bool bHaveDC)
 file.Flush();
 file.Close();
 
-pWMF-Seek( pos );)
+pWMF-Seek( pos );
+#endif
+
 }
 bEMFPlus = true;
 
@@ -265,7 +264,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, 
sal_Bool bHaveDC)
 
 OSL_ASSERT(length = 4);
 // reduce by 32bit length itself, skip in SeekRel if
-// impossibly unavailble
+// impossibly unavailable
 sal_uInt32 nRemainder = length = 4 ? length-4 : length;
 
 const size_t nRequiredHeaderSize = 12;
@@ -277,12 +276,12 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, 
sal_Bool bHaveDC)
 *pWMF  type  flags  size  dataSize;
 nRemainder -= nRequiredHeaderSize;
 
-EMFP_DEBUG(printf (\t\tEMF+ record type: %d\n, type));
+SAL_INFO (vcl.emf, \t\tEMF+ record type:   std::hex  type  
std::dec);
 
 // GetDC
 if( type == 16388 ) {
 bHaveDC = true;
-EMFP_DEBUG(printf (\t\tEMF+ lock DC (device context)\n));
+SAL_INFO (vcl.emf, \t\tEMF+ lock DC (device context));
 }
 
 // Get the length of the remaining data of this record based
@@ -454,26 +453,27 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 if(  !aBmpSaveList.empty()
( nRecType != EMR_STRETCHBLT )
( nRecType

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

2013-05-10 Thread Chris Sherlock
 cppcanvas/source/mtfrenderer/emfplus.cxx |   62 +++
 1 file changed, 31 insertions(+), 31 deletions(-)

New commits:
commit e3c5f8f5d484b3b31a66fcbddb6ef3f40604f7af
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 10 22:28:09 2013 +1000

Fix: change to std::dec after having used std::hex

The basefield flag of a stream is persistent, which I didn't realise before.
This fixes commit 256e42646bedbeb9cba900f962f36ba4b1a1cda3

Change-Id: Ic0076c63ae6236ae75dcd79d108add27391b2125
Reviewed-on: https://gerrit.libreoffice.org/3842
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index c17c38e..c0f9172 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -104,7 +104,7 @@ namespace cppcanvas
 sal_Int16 data;
 for (; i  0; i --) {
 s  data;
-SAL_INFO (cppcanvas.emf, EMF+\tdata:   std::hex  data);
+SAL_INFO (cppcanvas.emf, EMF+\tdata:   std::hex  data 
 std::dec);
 }
 s.Seek (pos);
 }
@@ -285,7 +285,7 @@ namespace cppcanvas
 s  header  parts;
 
 SAL_INFO (cppcanvas.emf, EMF+\tregion);
-SAL_INFO (cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   parts:   parts);
+SAL_INFO (cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   parts:   parts  std::dec );
 
 if (parts) {
 if( parts0 || 
sal_uInt32(parts)SAL_MAX_INT32/sizeof(sal_Int32) )
@@ -295,12 +295,12 @@ namespace cppcanvas
 
 for (int i = 0; i  parts; i ++) {
 s  combineMode [i];
-SAL_INFO (cppcanvas.emf, EMF+\tcombine mode [  i 
 ]: 0x  std::hex  combineMode [i]);
+SAL_INFO (cppcanvas.emf, EMF+\tcombine mode [  i 
 ]: 0x  std::hex  combineMode [i]  std::dec);
 }
 }
 
 s  initialState;
-SAL_INFO (cppcanvas.emf, EMF+\tinitial state: 0x  
std::hex  initialState);
+SAL_INFO (cppcanvas.emf, EMF+\tinitial state: 0x  
std::hex  initialState  std::dec);
 }
 };
 
@@ -370,7 +370,7 @@ namespace cppcanvas
 
 s  header  type;
 
-SAL_INFO (cppcanvas.emf, EMF+\tbrush\nEMF+\theader: 0x  
std::hex  header   type:   type);
+SAL_INFO (cppcanvas.emf, EMF+\tbrush\nEMF+\theader: 0x  
std::hex  header   type:   type  std::dec);
 
 switch (type) {
 case 0:
@@ -379,7 +379,7 @@ namespace cppcanvas
 
 s  color;
 solidColor = ::Color (0xff - (color  24), (color  
16)  0xff, (color  8)  0xff, color  0xff);
-SAL_INFO (cppcanvas.emf, EMF+\tsolid color: 0x  
std::hex  color);
+SAL_INFO (cppcanvas.emf, EMF+\tsolid color: 0x  
std::hex  color  std::dec);
 
 break;
 }
@@ -388,13 +388,13 @@ namespace cppcanvas
 {
 s  additionalFlags  wrapMode;
 
-SAL_INFO (cppcanvas.emf, EMF+\tpath gradient, 
additional flags: 0x  std::hex  additionalFlags);
+SAL_INFO (cppcanvas.emf, EMF+\tpath gradient, 
additional flags: 0x  std::hex  additionalFlags  std::dec);
 
 sal_uInt32 color;
 
 s  color;
 solidColor = ::Color (0xff - (color  24), (color  
16)  0xff, (color  8)  0xff, color  0xff);
-SAL_INFO(cppcanvas.emf, EMF+\tcenter color: 0x  
std::hex  color);
+SAL_INFO(cppcanvas.emf, EMF+\tcenter color: 0x  
std::hex  color  std::dec);
 
 s  areaX  areaY;
 SAL_INFO(cppcanvas.emf, EMF+\tcenter point:   
areaX  ,  areaY);
@@ -411,7 +411,7 @@ namespace cppcanvas
 surroundColors[i] = ::Color (0xff - (color  24), 
(color  16)  0xff, (color  8)  0xff, color  0xff);
 if (i == 0)
 secondColor = surroundColors [0];
-SAL_INFO(cppcanvas.emf, EMF+\tsurround color[ 
 i  ]: 0x  std::hex  color);
+SAL_INFO(cppcanvas.emf, EMF+\tsurround color[ 
 i  ]: 0x  std::hex  color  std::dec);
 }
 
 if (additionalFlags  0x01) {
@@ -430,7 +430,7 @@ namespace cppcanvas
 s  pathHeader  pathPoints  pathFlags;
 
 SAL_INFO(cppcanvas.emf, EMF+\tpath (brush path 
gradient));
-SAL_INFO(cppcanvas.emf, EMF+\theader: 0x  
std::hex  pathHeader   points

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

2013-05-10 Thread Chris Sherlock
 dbaccess/source/ui/browser/brwctrlr.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2fd73a725fc09e3e113c12a327e453324a67f31f
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 10 22:45:03 2013 +1000

Potty mouth

Change-Id: I276fa2fa24b5553a748e6e628129d54419e69c9a
Reviewed-on: https://gerrit.libreoffice.org/3843
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx 
b/dbaccess/source/ui/browser/brwctrlr.cxx
index fc5f6a3..9f284e7 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2560,7 +2560,7 @@ IMPL_LINK(SbaXDataBrowserController, 
OnSearchContextRequest, FmSearchContext*, p
 IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, 
pInfo)
 {
 Reference ::com::sun::star::sdbcx::XRowLocate   xCursor(getRowSet(), 
UNO_QUERY);
-OSL_ENSURE(xCursor.is(), SbaXDataBrowserController::OnFoundData : shit 
happens. sometimes. but this is simply impossible !);
+OSL_ENSURE(xCursor.is(), SbaXDataBrowserController::OnFoundData : this is 
simply impossible !);
 
 // move the cursor
 xCursor-moveToBookmark(pInfo-aPosition);
@@ -2601,7 +2601,7 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, 
FmFoundRecordInformatio
 
 try
 {
-OSL_ENSURE(xCursor.is(), 
SbaXDataBrowserController::OnCanceledNotFound : shit happens. sometimes. but 
this is simply impossible !);
+OSL_ENSURE(xCursor.is(), 
SbaXDataBrowserController::OnCanceledNotFound : this is simply impossible !);
 // move the cursor
 xCursor-moveToBookmark(pInfo-aPosition);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Compile errors when setting DBG_LEVEL=2

2013-05-11 Thread Chris Sherlock
Hey folks,

I'm having tremendous issues with compiling cppcanvas when setting
DBG_LEVEL=2

Some of these I have fixed in https://gerrit.libreoffice.org/#/c/3861/

However, I can't work out why I get the below errors. When DBG_LEVEL is 1
then I don't get the errors.

Can anyone shed any light on this? Very grateful to the person who spots
the issue!!!

Chris Sherlock

chris@LibreOfficeDev:~/repos/LibreOffice/core$ cat ~/error
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:806:28:
error: non-friend class member 'ReadRectangle' cannot have a qualified name
void ImplRenderer::ReadRectangle (SvStream s, float x, float y,
float width, float height, bool bCompressed)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:821:28:
error: non-friend class member 'ReadPoint' cannot have a qualified name
void ImplRenderer::ReadPoint (SvStream s, float x, float y,
sal_uInt32 flags)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:834:28:
error: non-friend class member 'MapToDevice' cannot have a qualified name
void ImplRenderer::MapToDevice (double x, double y)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:841:43:
error: non-friend class member 'Map' cannot have a qualified name
::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy)
~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:859:42:
error: non-friend class member 'MapSize' cannot have a qualified name
::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double
iheight)
   ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:881:28:
error: non-friend class member 'EMFPPlusFillPolygon' cannot have a
qualified name
void ImplRenderer::EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon
polygon, const ActionFactoryParameters rParms,
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1093:28:
error: non-friend class member 'EMFPPlusDrawPolygon' cannot have a
qualified name
void ImplRenderer::EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon
polygon, const ActionFactoryParameters rParms,
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1128:28:
error: non-friend class member 'processObjectRecord' cannot have a
qualified name
void ImplRenderer::processObjectRecord(SvMemoryStream
rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, sal_Bool
bUseWholeStream)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1201:30:
error: non-friend class member 'setFont' cannot have a qualified name
double ImplRenderer::setFont (sal_uInt8 objectId, const
ActionFactoryParameters rParms, OutDevState rState)
   ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1216:28:
error: non-friend class member 'GraphicStatePush' cannot have a qualified
name
void ImplRenderer::GraphicStatePush(GraphicStateMap map, sal_Int32
index, OutDevState rState)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1236:28:
error: non-friend class member 'GraphicStatePop' cannot have a qualified
name
void ImplRenderer::GraphicStatePop(GraphicStateMap map, sal_Int32
index, OutDevState rState)
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1253:28:
error: non-friend class member 'processEMFPlus' cannot have a qualified name
void ImplRenderer::processEMFPlus( MetaCommentAction* pAct, const
ActionFactoryParameters rFactoryParms,
 ~~^
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:616:77:
error: expected ';' at end of declaration
void Read (SvStream s, ImplRenderer rR, sal_Int32, sal_Int32 )

^

;
/home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:759:48:
error: call to 'valueOf' is ambiguous
emfp_debug_filename +=
OUString::valueOf(emfp_debug_stream_number++);
   ^
/home/chris/repos/LibreOffice/core/include/rtl/ustring.hxx:2129:62: note:
candidate function
SAL_DEPRECATED_INTERNAL(use boolean()) static OUString valueOf(
sal_Bool b ) SAL_THROW(())
 ^
/home/chris/repos/LibreOffice/core/include/rtl/ustring.hxx:2160:84: note:
candidate function
SAL_DEPRECATED_INTERNAL(convert to OUString or use directly) static
OUString valueOf( sal_Unicode c ) SAL_THROW(())

^
/home/chris/repos/LibreOffice/core/include/rtl/ustring.hxx:2175:61: note:
candidate

Re: Compile errors when setting DBG_LEVEL=2

2013-05-12 Thread Chris Sherlock
Worked it out - missing brace in an if statement. I was staring at this for
a long time till I decided to remove the conditional defines to make it
compile... then I found it.

I've pushed the fix.

Chris


On Sun, May 12, 2013 at 12:06 PM, Chris Sherlock chris.sherloc...@gmail.com
 wrote:

 Hey folks,

 I'm having tremendous issues with compiling cppcanvas when setting
 DBG_LEVEL=2

 Some of these I have fixed in https://gerrit.libreoffice.org/#/c/3861/

 However, I can't work out why I get the below errors. When DBG_LEVEL is 1
 then I don't get the errors.

 Can anyone shed any light on this? Very grateful to the person who spots
 the issue!!!

 Chris Sherlock

 chris@LibreOfficeDev:~/repos/LibreOffice/core$ cat ~/error
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:806:28:
 error: non-friend class member 'ReadRectangle' cannot have a qualified name
 void ImplRenderer::ReadRectangle (SvStream s, float x, float y,
 float width, float height, bool bCompressed)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:821:28:
 error: non-friend class member 'ReadPoint' cannot have a qualified name
 void ImplRenderer::ReadPoint (SvStream s, float x, float y,
 sal_uInt32 flags)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:834:28:
 error: non-friend class member 'MapToDevice' cannot have a qualified name
 void ImplRenderer::MapToDevice (double x, double y)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:841:43:
 error: non-friend class member 'Map' cannot have a qualified name
 ::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy)
 ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:859:42:
 error: non-friend class member 'MapSize' cannot have a qualified name
 ::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double
 iheight)
~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:881:28:
 error: non-friend class member 'EMFPPlusFillPolygon' cannot have a
 qualified name
 void ImplRenderer::EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon
 polygon, const ActionFactoryParameters rParms,
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1093:28:
 error: non-friend class member 'EMFPPlusDrawPolygon' cannot have a
 qualified name
 void ImplRenderer::EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon
 polygon, const ActionFactoryParameters rParms,
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1128:28:
 error: non-friend class member 'processObjectRecord' cannot have a
 qualified name
 void ImplRenderer::processObjectRecord(SvMemoryStream
 rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, sal_Bool
 bUseWholeStream)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1201:30:
 error: non-friend class member 'setFont' cannot have a qualified name
 double ImplRenderer::setFont (sal_uInt8 objectId, const
 ActionFactoryParameters rParms, OutDevState rState)
~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1216:28:
 error: non-friend class member 'GraphicStatePush' cannot have a qualified
 name
 void ImplRenderer::GraphicStatePush(GraphicStateMap map,
 sal_Int32 index, OutDevState rState)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1236:28:
 error: non-friend class member 'GraphicStatePop' cannot have a qualified
 name
 void ImplRenderer::GraphicStatePop(GraphicStateMap map, sal_Int32
 index, OutDevState rState)
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:1253:28:
 error: non-friend class member 'processEMFPlus' cannot have a qualified name
 void ImplRenderer::processEMFPlus( MetaCommentAction* pAct, const
 ActionFactoryParameters rFactoryParms,
  ~~^
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:616:77:
 error: expected ';' at end of declaration
 void Read (SvStream s, ImplRenderer rR, sal_Int32, sal_Int32
 )

 ^

 ;
 /home/chris/repos/LibreOffice/core/cppcanvas/source/mtfrenderer/emfplus.cxx:759:48:
 error: call to 'valueOf' is ambiguous
 emfp_debug_filename +=
 OUString::valueOf(emfp_debug_stream_number++);
^
 /home/chris/repos/LibreOffice/core/include/rtl/ustring.hxx:2129:62: note:
 candidate function
 SAL_DEPRECATED_INTERNAL(use boolean()) static OUString valueOf(
 sal_Bool

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

2013-05-12 Thread Chris Sherlock
 cppcanvas/source/mtfrenderer/emfplus.cxx |   35 +++
 vcl/source/filter/wmf/enhwmf.cxx |3 +-
 2 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 00fbf73b07adc4d8f0e37e36bb844f2e9d19ae15
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun May 12 11:11:52 2013 +1000

EMF+ fixes

A number of fixes have been made to commit
256e42646bedbeb9cba900f962f36ba4b1a1cda3:

* Missing redirect in SAL_WARN - only gets picked up when DBG_LEVEL  1
* Some errant newlines in SAL_INFO
* Some missing braces
* Missing semi-colon fixed (!)
* Changed int to sal_Int32 (causing ambiguity error)
* Add dumpWords to the SAL_WARN that ensures that size is not greater
  than length
* Show values when proessing EMF+ comment record (only enabled when
  DBG_LEVEL  2)
* Missing std::hex in SAL_INFO

Change-Id: I059ba24964dd428a56a31d100109cfec938a8a49
Reviewed-on: https://gerrit.libreoffice.org/3861
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index c0f9172..7203cc3 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -102,10 +102,12 @@ namespace cppcanvas
 {
 sal_uInt32 pos = s.Tell ();
 sal_Int16 data;
+SAL_INFO (cppcanvas.emf, EMF+ dumping words);
 for (; i  0; i --) {
 s  data;
 SAL_INFO (cppcanvas.emf, EMF+\tdata:   std::hex  data 
 std::dec);
 }
+SAL_INFO (cppcanvas.emf, EMF+ end dumping words);
 s.Seek (pos);
 }
 #endif
@@ -226,7 +228,7 @@ namespace cppcanvas
 }
 }
 
-if (polygon.count ())
+if (polygon.count ()) {
 aPolygon.append (polygon);
 
 #if OSL_DEBUG_LEVEL  1
@@ -238,15 +240,16 @@ namespace cppcanvas
 SAL_INFO (cppcanvas.emf, point:   
point.getX()  ,  point.getY());
 if (polygon.isPrevControlPointUsed(j)) {
 point = polygon.getPrevControlPoint(j);
-SAL_INFO (cppcanvas.emf, prev:   
point.getX() ,  point.getY());
+SAL_INFO (cppcanvas.emf, prev:   
point.getX()  ,  point.getY());
 }
 if (polygon.isNextControlPointUsed(j)) {
 point = polygon.getNextControlPoint(j);
-SAL_INFO (cppcanvas.emf, next:   
point.getX() ,  point.getY());
+SAL_INFO (cppcanvas.emf, next:   
point.getX()  ,  point.getY());
 }
 }
 }
 #endif
+}
 
 return aPolygon;
 }
@@ -370,7 +373,8 @@ namespace cppcanvas
 
 s  header  type;
 
-SAL_INFO (cppcanvas.emf, EMF+\tbrush\nEMF+\theader: 0x  
std::hex  header   type:   type  std::dec);
+SAL_INFO (cppcanvas.emf, EMF+\tbrush);
+SAL_INFO (cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   type:std::hex  type  std::dec);
 
 switch (type) {
 case 0:
@@ -607,6 +611,7 @@ namespace cppcanvas
 #if OSL_DEBUG_LEVEL  1
 if (width == 0.0) {
 SAL_INFO (cppcanvas.emf, TODO: pen with zero width - 
using minimal which might not be correct\n);
+}
 #endif
 rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * 
rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX ();
 }
@@ -618,7 +623,8 @@ namespace cppcanvas
 
 s  header  unknown  penFlags  unknown2  width;
 
-SAL_INFO(cppcanvas.emf, EMF+\tpen\nEMF+\theader: 0x  
std::hex  header   unknown: 0x  unknown 
+SAL_INFO(cppcanvas.emf, EMF+\tpen);
+SAL_INFO(cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   unknown: 0x  unknown 
  additional flags: 0x  penFlags   unknown: 
0x  unknown2   width:   std::dec  width );
 
 if (penFlags  1)
@@ -751,7 +757,7 @@ namespace cppcanvas
 // debug code - write the stream to debug file 
/tmp/emf-stream.emf
 #if OSL_DEBUG_LEVEL  1
 mfStream.Seek(0);
-static int emfp_debug_stream_number = 0;
+static sal_Int32 emfp_debug_stream_number = 0;
 OUString 
emfp_debug_filename(/tmp/emf-embedded-stream);
 emfp_debug_filename += 
OUString::valueOf(emfp_debug_stream_number++);
 emfp_debug_filename += OUString(.emf);
@@ -760,7 +766,7 @@ namespace

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

2013-05-12 Thread Chris Sherlock
 cppcanvas/source/mtfrenderer/emfplus.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 931984489e1f2da1b223ba927bda6a06e0d3f75f
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun May 12 15:42:32 2013 +1000

Janitorial: indent code correctly

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

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 3eebc81..4cfd7b9 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1504,19 +1504,19 @@ namespace cppcanvas
 
 pen-SetStrokeAttributes (aStrokeAttributes, 
*this, rState);
 
-ActionSharedPtr pPolyAction(
-internal::PolyPolyActionFactory::createPolyPolyAction(
-polygon, rFactoryParms.mrCanvas, rState, 
aStrokeAttributes ) );
+ActionSharedPtr pPolyAction(
+
internal::PolyPolyActionFactory::createPolyPolyAction(
+polygon, rFactoryParms.mrCanvas, rState, 
aStrokeAttributes ) );
 
-if( pPolyAction )
-{
-maActions.push_back(
-MtfAction(
-pPolyAction,
-rFactoryParms.mrCurrActionIndex ) );
+if( pPolyAction )
+{
+maActions.push_back(
+MtfAction(
+pPolyAction,
+rFactoryParms.mrCurrActionIndex ) );
 
-rFactoryParms.mrCurrActionIndex += 
pPolyAction-getActionCount()-1;
-}
+rFactoryParms.mrCurrActionIndex += 
pPolyAction-getActionCount()-1;
+}
 
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: README.cross

2013-05-15 Thread Chris Sherlock
 README.cross |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 91b27bc3d86925e1bb52bd3ab8e2f6f87ededd3f
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 16 00:49:50 2013 +1000

Documentation update of README.cross

* Fixed typos
* Errant/missing commas fixed
* autogen.lastrun - autogen.input

Change-Id: Ibc0d34f21de661139e622a34d760a6683f394643
Reviewed-on: https://gerrit.libreoffice.org/3916
Reviewed-by: Tor Lillqvist t...@iki.fi
Tested-by: Tor Lillqvist t...@iki.fi

diff --git a/README.cross b/README.cross
index 3d962eb..28e4a333 100644
--- a/README.cross
+++ b/README.cross
@@ -32,7 +32,7 @@ below.
 Note that in the case of LibreOffice, it is uncommon to run the
 configure script directly. Normally one uses the autogen.sh script.
 The autogen.sh script reads command-line options from file called
-autogen.lastrun if it exists. The typical way of working is to keep
+autogen.input if it exists. The typical way of working is to keep
 the configure parameters in that file and edit it as needed.
 
 
@@ -58,19 +58,19 @@ This OOo-originated MinGW support attempts to be for both 
running the
 Cygwin gcc in its -mno-cygwin mode, and a Windows-native MinGW
 compiler. The -mno-cygwin mechanism in the Cygwin gcc is rapidly being
 obsoleted, if it isn't already, and we have not attempted to try to
-keep it working; in fact we have activly cleaned out mechanisms
+keep it working; in fact we have actively cleaned out mechanisms
 related to this. Ditto for native MinGW. If one compiles natively on
 Windows, just use a version of Microsoft's compiler. OpenOffice.org
 and LibreOffice have been built for Windows all the time using that.
 
-The only case where it makes sense to use MinGW, is for
+The only case where it makes sense to use MinGW is for
 cross-compilation. There is just too much crack involved on Windows
 anyway, and it is a semi-miracle that the MSVC build under Cygwin
 works as nicely as it does.
 
 MinGW is available as cross-build toolchains pre-packaged in more or
 less official packages for many Linux distros including Debian, Fedora
-and openSUSE. For instance the mingw32 packages in the Open Build
+and openSUSE. For instance, the mingw32 packages in the Open Build
 Service, running on openSUSE, can be found at:
 
 http://download.opensuse.org/repositories/windows:/mingw:/win32/
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-06 Thread Chris Sherlock
 vcl/source/filter/wmf/enhwmf.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ddaceeaf227f5e0f2dbc6016ac20632421758adc
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jan 6 20:58:56 2014 +1100

Move default: to end of switch

This helps prevent silly people like myself from asking about it on
IRC. Basically it is a coding convention, I've moved the default to
the end of the switch block.

Change-Id: I43ace7cb9fee4cff0b12be8d3f6b3669b270b898
Reviewed-on: https://gerrit.libreoffice.org/7277
Reviewed-by: Tor Lillqvist t...@collabora.com
Tested-by: Tor Lillqvist t...@collabora.com

diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 3ad4481..4af22a9 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -748,9 +748,9 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 bTransparent = sal_True;
 aLineInfo.SetStyle( LINE_NONE );
 break;
-default :
 case PS_INSIDEFRAME :
 case PS_SOLID :
+default :
 aLineInfo.SetStyle( LINE_SOLID );
 }
 if ( nDashCount | nDotCount )
@@ -802,9 +802,9 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 aLineInfo.SetStyle( LINE_NONE );
 break;
 
-default :
 case PS_INSIDEFRAME :
 case PS_SOLID :
+default :
 aLineInfo.SetStyle( LINE_SOLID );
 }
 if ( nDashCount | nDotCount )
@@ -1378,7 +1378,6 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 }
 break;
 
-default :   SAL_INFO(vcl.emf, 
Unknown Meta Action); break;
 case EMR_MASKBLT :  SAL_INFO(vcl.emf, not 
implemented '  MaskBlt  ');   break;
 case EMR_PLGBLT :   SAL_INFO(vcl.emf, not 
implemented '  PlgBlt  ');break;
 case EMR_SETDIBITSTODEVICE :SAL_INFO(vcl.emf, not 
implemented '  SetDIBitsToDevice  '); break;
@@ -1433,6 +1432,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 case EMR_GDICOMMENT :
 case EMR_HEADER :   // has already been read at 
ReadHeader()
 break;
+
+default :   SAL_INFO(vcl.emf, 
Unknown Meta Action); break;
 }
 }
 pWMF-Seek( nNextPos );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-15 Thread Chris Sherlock
 writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx |   36 +++-
 1 file changed, 6 insertions(+), 30 deletions(-)

New commits:
commit 0402f6eaa146589951cd4ad30b6d38938fc04dfe
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jan 13 22:42:13 2014 +1100

fdo#73536 getIdentifier cannot be used

OOXMLFastTokenHandler uses a Boost tokenmap, but tokenmaps cannot be
indexed by an integer. I've removed the #if 0 code and generate a
RuntimeException as nobody should use the functions getIdentier or
getUTF8Identifier!

Change-Id: Ia4c3589d289eac3022f0ee6aeef8662286d64f36
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
index 9b82049..96adfde 100644
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
@@ -70,42 +70,18 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler
 return nResult;
 }
 
-OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token)
+OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32)
 throw (css::uno::RuntimeException)
 {
-OUString sResult;
-
-#if 0
-//FIXME this is broken: tokenmap::wordlist is not indexed by Token!
-if ( Token = 0 || Token  OOXML_FAST_TOKENS_END )
-{
-static OUString aTokens[OOXML_FAST_TOKENS_END];
-
-if (aTokens[Token].getLength() == 0)
-aTokens[Token] = OUString::createFromAscii
-(tokenmap::wordlist[Token].name);
-}
-#else
-(void) Token;
-#endif
-
-return sResult;
+// we use a Boost tokenmap, but tokenmaps cannot be indexed by an integer
+for (;;) { std::abort(); } // avoid must return a value warnings
 }
 
-css::uno::Sequence ::sal_Int8  SAL_CALL 
OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32 Token)
+css::uno::Sequence ::sal_Int8  SAL_CALL 
OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32)
 throw (css::uno::RuntimeException)
 {
-#if 0
-if ( Token  0  || Token = OOXML_FAST_TOKENS_END )
-#endif
-return css::uno::Sequence ::sal_Int8 ();
-
-#if 0
-//FIXME this is broken: tokenmap::wordlist is not indexed by Token!
-return css::uno::Sequence ::sal_Int8 (reinterpret_cast const sal_Int8 
*(tokenmap::wordlist[Token].name), strlen(tokenmap::wordlist[Token].name));
-#else
-(void) Token;
-#endif
+// we use a Boost tokenmap, but tokenmaps cannot be indexed by an integer
+for (;;) { std::abort(); } // avoid must return a value warnings
 }
 
 sal_Int32 OOXMLFastTokenHandler::getTokenDirect( const char *pStr, sal_Int32 
nLength ) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2014-01-16 Thread Chris Sherlock
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee99613941d78030e8abbca7d7554cf7e802f6d9
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu Jan 16 01:33:44 2014 +1100

Move fontconfig baseline to 2.4.1 (RHEL 5 version)

Change-Id: Ie79f534e7f5aa8fc9a87996c68e1251260403f66
Reviewed-on: https://gerrit.libreoffice.org/7460
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/configure.ac b/configure.ac
index 4c64535..bcd2fe7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4702,7 +4702,7 @@ AC_SUBST(ENABLE_CUPS)
 
 # fontconfig checks
 if test $test_fontconfig = yes; then
-PKG_CHECK_MODULES([FONTCONFIG], [fontconfig = 2.2.0])
+PKG_CHECK_MODULES([FONTCONFIG], [fontconfig = 2.4.1])
 SYSTEM_FONTCONFIG=YES
 fi
 AC_SUBST(FONTCONFIG_CFLAGS)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-16 Thread Chris Sherlock
 vcl/generic/fontmanager/fontconfig.cxx |   35 -
 1 file changed, 35 deletions(-)

New commits:
commit 7d432a9e67076b862cbdfc16199d5a72664d28f5
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri Jan 17 00:28:33 2014 +1100

Remove defines now that fontconfig baseline has been updated

Change-Id: Ia97ab24e60785be36f475f6bf275a0ae336e9408
Reviewed-on: https://gerrit.libreoffice.org/7461
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/vcl/generic/fontmanager/fontconfig.cxx 
b/vcl/generic/fontmanager/fontconfig.cxx
index 5eff5bf..0069f5f 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -37,41 +37,6 @@ using namespace psp;
 #include fontconfig/fontconfig.h
 #include ft2build.h
 #include fontconfig/fcfreetype.h
-// allow compile on baseline (currently with fontconfig 2.2.0)
-#ifndef FC_WEIGHT_BOOK  // TODO: remove when baseline moves to fc=2.2.1
-#define FC_WEIGHT_BOOK 75
-#endif
-#ifndef FC_EMBEDDED_BITMAP  // TODO: remove when baseline moves to fc=2.3.92
-#define FC_EMBEDDED_BITMAP embeddedbitmap
-#endif
-#ifndef FC_FAMILYLANG   // TODO: remove when baseline moves to fc=2.2.97
-#define FC_FAMILYLANG familylang
-#endif
-#ifndef FC_CAPABILITY   // TODO: remove when baseline moves to fc=2.2.97
-#define FC_CAPABILITY capability
-#endif
-#ifndef FC_STYLELANG// TODO: remove when baseline moves to fc=2.2.97
-#define FC_STYLELANG stylelang
-#endif
-#ifndef FC_HINT_STYLE   // TODO: remove when baseline moves to fc=2.2.91
-#define FC_HINT_STYLE  hintstyle
-#define FC_HINT_NONE   0
-#define FC_HINT_SLIGHT 1
-#define FC_HINT_MEDIUM 2
-#define FC_HINT_FULL   3
-#endif
-#ifndef FC_FT_FACE
-#define FC_FT_FACE ftface
-#endif
-#ifndef FC_EMBOLDEN
-#define FC_EMBOLDEN embolden
-#endif
-#ifndef FC_MATRIX
-#define FC_MATRIX matrix
-#endif
-#ifndef FC_FONTFORMAT
-#define FC_FONTFORMAT fontformat
-#endif
 
 #if defined(ENABLE_DBUS)  defined(ENABLE_PACKAGEKIT)
 #include dbus/dbus-glib.h
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-16 Thread Chris Sherlock
 include/vcl/outdev.hxx |   54 -
 1 file changed, 23 insertions(+), 31 deletions(-)

New commits:
commit 6d87a2c28f074953a84fd9e5a4aed333ae30136a
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri Jan 17 01:20:58 2014 +1100

fdo#39468 translate more German comments, etc.

* Translated some more German comments
* Some typos corrected
* Removed useless comment decoration

Change-Id: I40176e23983193e5087f48cf7d7b8e5eb339d6c6
Reviewed-on: https://gerrit.libreoffice.org/7463
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 824af87..504366a 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -101,31 +101,27 @@ namespace vcl
 struct FontCapabilities;
 }
 
-// -
-// - OutputDevice-Data -
-// -
+// OutputDevice-Data
 
 struct ImplMapRes
 {
-longmnMapOfsX;  // Offset in X Richtung
-longmnMapOfsY;  // Offset in Y Richtung
-longmnMapScNumX;// Skal.-faktor Zaehler X Richtung
-longmnMapScNumY;// Skal.-faktor Zaehler Y Richtung
-longmnMapScDenomX;  // Skal.-faktor Nenner X Richtung
-longmnMapScDenomY;  // Skal.-faktor Nenner Y Richtung
+longmnMapOfsX;  // Offset in X direction
+longmnMapOfsY;  // Offset in Y direction
+longmnMapScNumX;// Scaling factor - numerator in X 
direction
+longmnMapScNumY;// Scaling factor - numerator in Y 
direction
+longmnMapScDenomX;  // Scaling factor - denominator in 
X direction
+longmnMapScDenomY;  // Scaling factor - denominator in 
Y direction
 };
 
 struct ImplThresholdRes
 {
-longmnThresLogToPixX;   // Schwellenwerte fuer Berechnung
-longmnThresLogToPixY;   // mit BigInts
+longmnThresLogToPixX;   // Thresholds for calculation
+longmnThresLogToPixY;   // with BigInts
 longmnThresPixToLogX;   // 
 longmnThresPixToLogY;   // 
 };
 
-// --
-// - OutputDevice-Types -
-// --
+// OutputDevice-Types
 
 // Flags for Push()
 #define PUSH_LINECOLOR  ((sal_uInt16)0x0001)
@@ -246,9 +242,7 @@ enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, 
OUTDEV_PRINTER, OUTDEV_VIRDEV
 
 enum OutDevViewType { OUTDEV_VIEWTYPE_DONTKNOW, OUTDEV_VIEWTYPE_PRINTPREVIEW, 
OUTDEV_VIEWTYPE_SLIDESHOW };
 
-// 
-// - OutputDevice -
-// 
+// OutputDevice
 
 class VirtualDevice;
 class Printer;
@@ -551,7 +545,7 @@ public:
 
 OutDevType  GetOutDevType() const { return meOutDevType; }
 
-/** query an codeOutputDevice/code whether it spports a specific 
operation
+/** query an codeOutputDevice/code to see whether it supports a 
specific operation
 
 @return
 true if operation supported, else false
@@ -603,7 +597,7 @@ public:
 This method splits up the text rect into multiple
 MetaTextActions, one for each line of text. This is comparable
 to AddGradientActions(), which splits up a gradient into its
-constituing polygons. Parameter semantics fully compatible to
+constituent polygons. Parameter semantics fully compatible to
 DrawText().
  */
 voidAddTextRectActions( const Rectangle rRect,
@@ -876,8 +870,8 @@ public:
 If this OutputDevice is used for displaying a Print Preview
 the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
 
-A View than can make painting decisions dependent on this OutDevViewType.
-E.g. text colors need to be handled different, dependent on whether it's a 
PrintPreview or not. (see #106611# for more)
+A View can then make painting decisions dependent on this OutDevViewType.
+E.g. text colors need to be handled differently, dependent on whether it's 
a PrintPreview or not. (see #106611# for more)
 */
 voidSetOutDevViewType( OutDevViewType eOutDevViewType ) { 
meOutDevViewType=eOutDevViewType; }
 OutDevViewType  GetOutDevViewType() const { return meOutDevViewType; }
@@ -961,12 +955,12 @@ public:
 pixel, i.e. some output modes such as metafile recordings
 might be completely unaffected by this method! Use with
 care. Furthermore, if the OutputDevice's MapMode is the
-default (that's MAP_PIXEL), then, too, any pixel offset set is
-ignored. This might be unintuitive for cases, but would have
-been far more fragile to implement. What's more, the reason
-why the pixel offset was introduced (avoiding

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

2014-01-17 Thread Chris Sherlock
 vcl/source/gdi/impfont.cxx |   21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 683764db4c435f27a83a2fdcf532be245c7fe4c9
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Jan 14 00:04:46 2014 +1100

Additional warnings when processing cmap tables

Small enhancements to the code:
* Removed unused code that clips unicode characters to the baseplane
* Add a SAL_WARNING if the maximum character is greater than the
  minimum character.

Change-Id: I783fba75435e7f98a65afab2e091b737efc9ddc6
Reviewed-on: https://gerrit.libreoffice.org/7404
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx
index bfe99dc..9b27e3a 100644
--- a/vcl/source/gdi/impfont.cxx
+++ b/vcl/source/gdi/impfont.cxx
@@ -419,10 +419,14 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult rResult )
 const sal_UCS4 cMaxChar = Getsal_uInt16( pLimitBase + 2*i );
 const int nGlyphDelta  = GetSShort( pDeltaBase + 2*i );
 const int nRangeOffset = Getsal_uInt16( pOffsetBase + 2*i );
-if( cMinChar  cMaxChar )   // no sane font should trigger this
+if( cMinChar  cMaxChar ) {  // no sane font should trigger this
+SAL_WARN(vcl.gdi, Min char should never be more than the 
max char!);
 break;
-if( cMaxChar == 0x )
+}
+if( cMaxChar == 0x ) {
+SAL_WARN(vcl.gdi, Format 4 char should not be 0x);
 break;
+}
 *(pCP++) = cMinChar;
 *(pCP++) = cMaxChar + 1;
 if( !nRangeOffset ) {
@@ -454,15 +458,12 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult rResult )
 sal_UCS4 cMaxChar = GetUInt( pGroup + 4 );
 int nGlyphId = GetUInt( pGroup + 8 );
 pGroup += 12;
-#if 0   // TODO: remove unicode baseplane clipping for UCS-4 support
-if( cMinChar  0x )
-continue;
-if( cMaxChar  0x )
-cMaxChar = 0x;
-#else
-if( cMinChar  cMaxChar )   // no sane font should trigger this
+
+if( cMinChar  cMaxChar ) {   // no sane font should trigger this
+SAL_WARN(vcl.gdi, Min char should never be more than the 
max char!);
 break;
-#endif
+}
+
 *(pCP++) = cMinChar;
 *(pCP++) = cMaxChar + 1;
 pStartGlyphs[i] = nGlyphId;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Doxygen documentation update

2014-01-18 Thread Chris Sherlock
I have been interested in the LibreOffice codebase for a long time. As
such, I've been doing a lot of reading of the code around VCL, and have
decided to attempt to document it somewhat better.

I have started with the Application class. I'm, of course, a bit of a
newbie around this area, could anyone have a look at the following I
submitted to Gerrit and review what I've written?

https://gerrit.libreoffice.org/#/c/7515/

Thanks!
Chris Sherlock
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-01-20 Thread Chris Sherlock
 include/vcl/svapp.hxx |  468 --
 1 file changed, 418 insertions(+), 50 deletions(-)

New commits:
commit 89a7b8a13285dcf614b162c1b8bd94b6785d3f87
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Jan 18 23:10:58 2014 +1100

Document VCL Application class

Documented the VCL Application class in Doxygen format. Also
reindented some of the code, and moved ValidateSystemFont down
the list of class functions (better code organization).

Change-Id: Id421647a9a25e11be87b0f6c46d1ac0f4846f6a4
Reviewed-on: https://gerrit.libreoffice.org/7515
Reviewed-by: Michael Meeks michael.me...@collabora.com
Tested-by: Michael Meeks michael.me...@collabora.com

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1620efa..aee 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -140,78 +140,432 @@ private:
 std::vectorOUString aData;
 };
 
+/**
+ @brief Abstract base class used for the LibreOffice Desktop class.
+
+ Abstract base class used for the LibreOffice Desktop class.
+
+ The Application class is an abstract class with one pure virtual
+ function: @Main. The main class that is subclassed is the Desktop
+ class, however there are a \em lot of static functions that are
+ vital for applications. It is really meant to be subclassed to
+ provide a global singleton, and heavily relies on a single data
+ structure ImplSVData
 
+ The reason Application exists is because the VCL used to be a
+ standalone framework, long since abandoned by anything other than
+ our application.
+
+ @see   Desktop, ImplSVData
+ */
 class VCL_DLLPUBLIC Application
 {
 public:
 enum DialogCancelMode {
-DIALOG_CANCEL_OFF, /// do not automatically cancel dialogs
-DIALOG_CANCEL_SILENT, /// silently cancel any dialogs
-DIALOG_CANCEL_FATAL
-/// cancel any dialogs by std::abort
+DIALOG_CANCEL_OFF,  /// do not automatically cancel dialogs
+DIALOG_CANCEL_SILENT,   /// silently cancel any dialogs
+DIALOG_CANCEL_FATAL /// cancel any dialogs by std::abort
 };
 
+/**
+Default constructor for Application class.
+
+Initializes the LibreOffice global instance data structure if needed,
+and then sets itself to be the Application class. Also initializes any
+platform specific data structures.
+
+@attention The initialization of the application itself is done in
+@Init
+
+@seeInitSalData is implemented by platform specific code.
+ImplInitSVData initializes the global instance data
+*/
 Application();
+
+/** Virtual destructor for Application class.
+
+Deinitializes the LibreOffice global instance data structure, then
+deinitializes any platform specific data structures.
+
+ @see   ImplDeInitSVData deinitializes the global instance data,
+DeInitSalData is implemented by platform specific code
+*/
 virtual ~Application();
 
+/** @brief Pure virtual entrypoint to the application.
+
+ Main() is the pure virtual entrypoint to your application. You
+ inherit your class from Application and subclass this function to
+ implement an application.
+
+ The Main() function does not pass in command line parameters,
+ you must use the functions @GetCommandLineParamCount() and
+ @GetCommandLineParam to get these values as these are platform
+ independent ways of getting the command line (use @GetAppFileName
+ to get the invoked executable filename).
+
+ Once in this function, you create windows, etc. then call on
+ @Execute to start the application's main event loop.
+
+ An example code snippet follows (it won't compile, this just gives the
+ general flavour of the framework and is adapted from an old HelloWorld
+ example program that Star Division used to provide as part of their
+ library).
+
+ \code{.cpp}
+class TheApplication : public Application
+{
+public:
+virtual void Main();
+};
+
+class TheWindow : public WorkWindow
+{
+public:
+TheWindow(Window *parent, WinBits windowStyle) :
+WorkWindow(parent, windowStyle) {}
+
+virtual void Paint(const Rectangle );
+};
+
+void TheWindow::Paint(const Rectangle)
+{
+DrawText(Point(100,100), String(Hello World!));
+}
+
+void TheApplication::Main()
+{
+TheWindow aWindow(NULL, WB_APP | WB_STDWORK);
+aWindow.Show();
+Execute();
+}
+
+TheApplication anApplication;
+\endcode
+
+Some examples in the source tree can be found here:
+
+\example vcl\workben\svdem.cxx
+This is an example of how to use the Application and WorkWindow. 
Unfortunately

[Libreoffice-commits] core.git: desktop/inc desktop/source include/vcl svtools/source vcl/source

2014-01-20 Thread Chris Sherlock
 desktop/inc/app.hxx|2 +-
 desktop/source/app/app.cxx |2 +-
 include/vcl/svapp.hxx  |3 +--
 svtools/source/config/apearcfg.cxx |2 +-
 vcl/source/app/svapp.cxx   |3 +--
 vcl/source/window/window.cxx   |2 +-
 vcl/source/window/winproc.cxx  |   11 +++
 7 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit b799cb7528552b0538f3ee1f5afc935c406f5637
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Jan 21 01:26:32 2014 +1100

Remove unused Window parameter from SystemSettingsChanging

This took a bit of code archaelogy for me to track down. It turns out that
as part of an effort to optimize startup, the line of code in this function
was commented out, presumably to be rewritten later. This happened in
commit ee3351d78c in July 2001 (!).

About three years later, in February 2004, the function was rewritten in
commit 189c2388d80. As it turns out, the only two functions that used
the Window parameter were vcl/source/window/window.cxx (which passed
itself in, but of course this did nothing) and
vcl/source/window/winproc.cxx. Furthermore, winproc only ever passed in
the first frame, so it didn't really do anything either.

Consequently, the function as it stands *now* only notifies the
application that system settings have been changed. It doesn't care
which window it tells.

Therefore, I have excised this parameter from the function. I don't
think it made sense when it was implemented anyway, so there is no net
loss.

After removing the unneeded parameter, I was also able to remove the
Window parameter from winproc.cxx's ImplHandleSalSettings function as
it was only ever used to set the top level window, which is now
irrelevant.

Change-Id: I84f2c5c5ff8969387da3af81e4a9c7f9ac6237e1
Reviewed-on: https://gerrit.libreoffice.org/7541
Reviewed-by: Michael Meeks michael.me...@collabora.com
Tested-by: Michael Meeks michael.me...@collabora.com

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 31d0dae..009bd75 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -78,7 +78,7 @@ class Desktop : public Application
 virtual voidDeInit();
 virtual sal_BoolQueryExit();
 virtual sal_uInt16  Exception(sal_uInt16 nError);
-virtual voidSystemSettingsChanging( AllSettings 
rSettings, Window* pFrame );
+virtual voidSystemSettingsChanging( AllSettings rSettings 
);
 virtual voidAppEvent( const ApplicationEvent rAppEvent );
 
 DECL_LINK(  OpenClients_Impl, void* );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 691dc6c..962e2b4 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1933,7 +1933,7 @@ sal_Bool Desktop::InitializeQuickstartMode( const 
Reference XComponentContext 
 }
 }
 
-void Desktop::SystemSettingsChanging( AllSettings rSettings, Window* )
+void Desktop::SystemSettingsChanging( AllSettings rSettings )
 {
 if ( !SvtTabAppearanceCfg::IsInitialized () )
 return;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index aee..0432a17 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -563,8 +563,7 @@ public:
  */
 static sal_Bool IsUICaptured();
 
-virtual voidSystemSettingsChanging( AllSettings rSettings,
-Window* pFrame );
+virtual voidSystemSettingsChanging( AllSettings rSettings 
);
 static void MergeSystemSettings( AllSettings rSettings );
 
 static void SetSettings( const AllSettings rSettings );
diff --git a/svtools/source/config/apearcfg.cxx 
b/svtools/source/config/apearcfg.cxx
index b24c200..81948c6 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -219,7 +219,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( 
Application* pApp )
 
 hAppSettings.SetStyleSettings( hAppStyle );
 pApp-MergeSystemSettings( hAppSettings );  // Allow 
system-settings to apply
-pApp-SystemSettingsChanging ( hAppSettings, NULL );// Allow overruling of 
system-settings
+pApp-SystemSettingsChanging ( hAppSettings );  // Allow overruling of 
system-settings
 //is concerned with 
window drag
 
 pApp-SetSettings ( hAppSettings );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5e573d0..6d345f3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -476,8 +476,7 @@ sal_Bool Application::IsUICaptured()
 return sal_False;
 }
 
-void Application::SystemSettingsChanging( AllSettings /*rSettings

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

2014-01-21 Thread Chris Sherlock
 include/vcl/svapp.hxx|   21 +++--
 sd/source/ui/slideshow/slideshowimpl.cxx |8 
 vcl/source/app/svapp.cxx |   10 --
 3 files changed, 27 insertions(+), 12 deletions(-)

New commits:
commit 1d621d363cf966648fc5ed551dbc95de3e70e89c
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Jan 19 13:13:07 2014 +1100

Change EnableNoYieldMode(bool) to better names

It makes no sense to disable something via an Enable function.
I have split the function into Enable and Disable functions, and
update the code accordingly.

Conflicts:
include/vcl/svapp.hxx

Change-Id: Ic05d69796f43e802a4a2a16aaca44433b6eaa018
Reviewed-on: https://gerrit.libreoffice.org/7525
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 0432a17..8e7b053 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -469,17 +469,26 @@ public:
  No yield mode prevents @Yield from waiting for events.
 
  @remarks This was originally implemented in OOo bug 98792 to improve
-Impress slideshows. For some reason, to \em disable no yield mode, you
-call on EnableNoYieldMode
+Impress slideshows.
 
- @param i_bNoYield  If set to false, then no yield mode is turned 
off.
-If set to true, then no yield mode is turned on.
+ @see DisableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, 
GetSolarMutex,
+  GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
+  AddPostYieldListener, RemovePostYieldListener
+*/
+static void EnableNoYieldMode();
 
- @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex,
+/** @Brief Disables no yield mode
+
+ No yield mode prevents @Yield from waiting for events.
+
+ @remarks This was originally implemented in OOo bug 98792 to improve
+Impress slideshows.
+
+ @see EnableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, 
GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
   AddPostYieldListener, RemovePostYieldListener
 */
-static void EnableNoYieldMode( bool i_bNoYield );
+static void DisableNoYieldMode();
 
 /** Add a listener for yield events
 
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 87e6435..2bc4d72 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -760,7 +760,7 @@ void SAL_CALL SlideshowImpl::disposing()
 
 setActiveXToolbarsVisible( sal_True );
 
-Application::EnableNoYieldMode(false);
+Application::DisableNoYieldMode();
 Application::RemovePostYieldListener(LINK(this, SlideshowImpl, 
PostYieldListener));
 
 mbDisposed = true;
@@ -1855,7 +1855,7 @@ IMPL_LINK_NOARG(SlideshowImpl, PostYieldListener)
 // prevent me from deletion when recursing (App::Reschedule does)
 const rtl::ReferenceSlideshowImpl this_(this);
 
-Application::EnableNoYieldMode(false);
+Application::DisableNoYieldMode();
 Application::RemovePostYieldListener(LINK(this, SlideshowImpl, 
PostYieldListener));
 Application::Reschedule(true); // fix for fdo#32861 - process
// *all* outstanding events after
@@ -1896,7 +1896,7 @@ sal_Int32 SlideshowImpl::updateSlideShow (void)
 if (::basegfx::fTools::equalZero(fUpdate))
 {
 // Use post yield listener for short update intervalls.
-Application::EnableNoYieldMode(true);
+Application::EnableNoYieldMode();
 Application::AddPostYieldListener(LINK(this, SlideshowImpl, 
PostYieldListener));
 }
 else
@@ -1917,7 +1917,7 @@ sal_Int32 SlideshowImpl::updateSlideShow (void)
 // integer may lead to zero value.)
 OSL_ASSERT(static_castsal_uLong(fUpdate * 1000.0)  0);
 
-Application::EnableNoYieldMode(false);
+Application::DisableNoYieldMode();
 Application::RemovePostYieldListener(LINK(this, SlideshowImpl, 
PostYieldListener));
 
 // Use a timer for the asynchronous callback.
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6d345f3..a754856 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -986,10 +986,16 @@ void Application::RemoveIdleHdl( const Link rLink )
 pSVData-maAppData.mpIdleMgr-RemoveIdleHdl( rLink );
 }
 
-void Application::EnableNoYieldMode( bool i_bNoYield )
+void Application::EnableNoYieldMode()
 {
 ImplSVData* pSVData = ImplGetSVData();
-pSVData-maAppData.mbNoYield = i_bNoYield;
+pSVData-maAppData.mbNoYield = true;
+}
+
+void Application

Proposal: remove Live Scroll option from LibreOffice

2014-01-22 Thread Chris Sherlock
Hi everyone,

I've lodged bug 73921 at
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=73921

I would like to propose that we remove the Live Scroll option from the
code.

When Live Scroll is on, it means that when the user moves the slider in the
scroll bar, the content of the window is updated immediately.

If you turn off Live Scroll then the window is only updated after the user
has released the mouse button.

I don't really think anyone would be turning this off. However, I'd like to
get some feedback on this, so I logged the bug and I'm bringing it to the
dev list before I go ahead and start excising the code that removes the
option.

Can I get the thoughts of others? Also, should I be taking this to another
mailing list? I can't imagine many people use the setting, but I suppose
you can never be too sure.

Otherwise, the code is probably not necessary and can go.

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


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

2014-01-22 Thread Chris Sherlock
 desktop/source/app/app.cxx |4 ++--
 include/vcl/svapp.hxx  |2 ++
 vcl/source/app/svapp.cxx   |   17 +
 3 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 4959f369d9bdcc2ab50cd4a70ad96a4a4fa17c76
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Wed Jan 22 18:45:19 2014 +1100

Improve settings code reability

Application::SetSettings relies on Application::GetSettings to
initialize the application's settings if this hasn't happened.
This means that GetSettings is being used not to get the app's
settings, but to initialize the settings!

I have corrected this by introducing a private static function
InitSettings(). Note that I assert if it attempts to initialize
already initialized settings, because the (Get|Set)Settings
does the check for you.

Also changed a local variable from nGet to nDragMode in
Desktop::SystemSettingsChanging to make it easier to read the
code. Whilst this is minor, a variable name of nGet seems
very sloppy.

Change-Id: I04975217c2028b3489179997db4287957578cc93
Reviewed-on: https://gerrit.libreoffice.org/7586
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 962e2b4..8c0fe6a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1951,8 +1951,8 @@ void Desktop::SystemSettingsChanging( AllSettings 
rSettings )
 sal_uInt32 nDragFullOptions = hStyleSettings.GetDragFullOptions();
 
 SvtTabAppearanceCfg aAppearanceCfg;
-sal_uInt16 nGet = aAppearanceCfg.GetDragMode();
-switch ( nGet )
+sal_uInt16 nDragMode = aAppearanceCfg.GetDragMode();
+switch ( nDragMode )
 {
 case DragFullWindow:
 nDragFullOptions |= DRAGFULL_OPTION_ALL;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 8e7b053..f0e9b80 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -780,6 +780,8 @@ public:
 
 private:
 
+static void InitSettings();
+
 DECL_STATIC_LINK( Application, PostEventHandler, void* );
 };
 
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a754856..ac13c73 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -519,7 +519,7 @@ void Application::SetSettings( const AllSettings rSettings 
)
 ImplSVData* pSVData = ImplGetSVData();
 if ( !pSVData-maAppData.mpSettings )
 {
-GetSettings();
+InitSettings();
 *pSVData-maAppData.mpSettings = rSettings;
 ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() );
 }
@@ -618,14 +618,23 @@ const AllSettings Application::GetSettings()
 ImplSVData* pSVData = ImplGetSVData();
 if ( !pSVData-maAppData.mpSettings )
 {
-pSVData-maAppData.mpCfgListener = new LocaleConfigurationListener;
-pSVData-maAppData.mpSettings = new AllSettings();
-
pSVData-maAppData.mpSettings-GetSysLocale().GetOptions().AddListener( 
pSVData-maAppData.mpCfgListener );
+InitSettings();
 }
 
 return *(pSVData-maAppData.mpSettings);
 }
 
+void Application::InitSettings()
+{
+ImplSVData* pSVData = ImplGetSVData();
+
+assert(!pSVData-maAppData.mpSettings); // initialization should not 
happen twice!
+
+pSVData-maAppData.mpCfgListener = new LocaleConfigurationListener;
+pSVData-maAppData.mpSettings = new AllSettings();
+pSVData-maAppData.mpSettings-GetSysLocale().GetOptions().AddListener( 
pSVData-maAppData.mpCfgListener );
+}
+
 void Application::NotifyAllWindows( DataChangedEvent rDCEvt )
 {
 ImplSVData* pSVData = ImplGetSVData();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-22 Thread Chris Sherlock
 include/vcl/svapp.hxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit e6e3ce2c9558d3d5aedec5388011ba408ed555fc
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu Jan 23 02:26:39 2014 +1100

Fix misaligned code comment

I accidentally introduced this problem in commit 89a7b8a13285

Moved line of code to before the correct function.

Change-Id: Ic044a5607dc385140ca51d1bf4aa734c0cf99904
Reviewed-on: https://gerrit.libreoffice.org/7595
Reviewed-by: Jan-Marek Glogowski glo...@fbihome.de
Tested-by: Jan-Marek Glogowski glo...@fbihome.de

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index f0e9b80..f0fe3ca 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -631,10 +631,9 @@ public:
 TRUE/ if the system font is suitable for our UI
 FALSE/ if the test string could not be displayed with the system font
  */
-
-// default name of the application for message dialogs and printing
 static bool ValidateSystemFont();
 
+// default name of the application for message dialogs and printing
 static void SetDisplayName( const OUString rDisplayName );
 static OUString GetDisplayName();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-23 Thread Chris Sherlock
 include/vcl/svapp.hxx |  163 +++---
 1 file changed, 142 insertions(+), 21 deletions(-)

New commits:
commit a9f0b3bd33f93c4066ae9b38241c5cf67f6f4a46
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Wed Jan 22 18:18:15 2014 +1100

Document more of VCL's Application class

* Documented the Application class's settings functions. When
  reading through the code, I have noticed that GetSettings
  intializes the application settings (!) and that SetSettings
  relies on GetSettings to initialize the settings (!), so I
  have listed a todo entry.

  Furthermore, I've also noticed that SetSystemSettings and
  MergeSystemSettings may be confused with the purpose of
  SetSettings so I've added a todo entry that recommends that
  we return an AllSettings object and make the parameters const.

* Minor whitespace changes

* Update @see for a number of public functions

* Group functions into Doxygen modules
Change-Id: I48f8d21a5d6436a2ae545e5156b877d57a8bc585

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index f0fe3ca..05d982a 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -268,7 +268,10 @@ public:
 */
 virtual voidUserEvent( sal_uLong nEvent, void* pEventData 
);
 
-// Functions that notify when changes occur in the application
+/** @defgroup changes Change notification functions
+Functions that notify when changes occur in the application
+@{
+*/
 
 /** Notify that the application is no longer the focused (or current)
 application - needed for Windowing systems where an end user can switch
@@ -287,7 +290,12 @@ public:
 */
 virtual voidDataChanged( const DataChangedEvent rDCEvt );
 
-// Initialization functions
+/** @} */ // end of changes
+
+/** @defgroup Initialization
+Initialization functions
+@{
+*/
 
 /** Initialize the application itself.
 
@@ -313,7 +321,12 @@ public:
 */
 virtual voidDeInit();
 
-// Command line processing:
+/** @} */ // end of Initialization
+
+
+/** @defgroup CommandLine Command line processing
+@{
+*/
 
 /** Gets the number of command line parameters passed to the application
 
@@ -341,7 +354,12 @@ public:
 */
 static OUString GetAppFileName();
 
-// Error handling
+/** @} */ // end of CommandLine
+
+/** @defgroup ErrorHandling Error handling
+@{
+*/
+
 /** Handles an error code.
 
  @remark This is not actually an exception. It merely takes an
@@ -369,13 +387,18 @@ public:
 */
 static void Abort( const OUString rErrorText );
 
-// Event loop functions:
+/** @} */ // end of CommandLine
+
+/** @defgroup EventLoop Event loop functions
+@{
+*/
 
 /** Run the main event processing loop until it is quit by @Quit.
 
  @see Quit, Reschedule, Yield, EndYield, GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
-  EnableNoYieldMode, AddPostYieldListener, RemovePostYieldListener
+  EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener,
+  RemovePostYieldListener
 */
 static void Execute();
 
@@ -383,7 +406,8 @@ public:
 
  @see Execute, Reschedule, Yield, EndYield, GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
-  EnableNoYieldMode, AddPostYieldListener, RemovePostYieldListener
+  EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener,
+  RemovePostYieldListener
 */
 static void Quit();
 
@@ -395,8 +419,8 @@ public:
 
  @see Execute, Quit, Yield, EndYield, GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
-  EnableNoYieldMode, AddPostYieldListener, RemovePostYieldListener
-
+  EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener,
+  RemovePostYieldListener
  */
 static void Reschedule( bool bAllEvents = false );
 
@@ -404,7 +428,8 @@ public:
 
  @see Execute, Quit, Reschedule, EndYield, GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
-  EnableNoYieldMode, AddPostYieldListener, RemovePostYieldListener
+  EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener,
+  RemovePostYieldListener
 */
 static void Yield();
 
@@ -412,7 +437,8 @@ public:
 
  @see Execute, Quit, Reschedule, Yield, GetSolarMutex,
   GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
-  EnableNoYieldMode, AddPostYieldListener, RemovePostYieldListener
+  EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener,
+  RemovePostYieldListener
 */
 static void

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

2014-01-23 Thread Chris Sherlock
 desktop/source/app/app.cxx  |9 +
 include/vcl/settings.hxx|6 --
 vcl/source/app/settings.cxx |5 +
 3 files changed, 6 insertions(+), 14 deletions(-)

New commits:
commit 99dafea3e56e5d2b559352896a509bf7fa0fdab5
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Wed Jan 22 18:24:55 2014 +1100

Move defines into settings.hxx

For some unknown reason, there are a bunch of defines in the middle of
Desktop::SystemSettingsChanging() that should really be in
include/vcl/settings.hxx. I have now moved DRAG_OPTIONS_ALL into
settings.hxx but entirely removed DRAG_OPTIONS_NONE because it is
confusing. I also removed it in the one place this combination of options
is used in the Desktop class.

I have also removed the options DRAG_OPTIONS_OBJECT_* from settings.hxx
because they are used nowhere in the code. I have carefully looked
through the code and nothing flips bits 0x0004 or 0x0008 on
the private member of ImplStyleData's mnDragFullOptions in any way.
Basically, it is safe to remove.

Change-Id: Icf6268f940cfaed271bd43c977473fecfc726949
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 8c0fe6a..9b32f6c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1938,13 +1938,6 @@ void Desktop::SystemSettingsChanging( AllSettings 
rSettings )
 if ( !SvtTabAppearanceCfg::IsInitialized () )
 return;
 
-#   define DRAGFULL_OPTION_ALL \
- ( DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE  \
- | DRAGFULL_OPTION_OBJECTMOVE  | DRAGFULL_OPTION_OBJECTSIZE \
- | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT  \
- | DRAGFULL_OPTION_SCROLL )
-#   define DRAGFULL_OPTION_NONE ((sal_uInt32)~DRAGFULL_OPTION_ALL)
-
 StyleSettings hStyleSettings   = rSettings.GetStyleSettings();
 MouseSettings hMouseSettings = rSettings.GetMouseSettings();
 
@@ -1958,7 +1951,7 @@ void Desktop::SystemSettingsChanging( AllSettings 
rSettings )
 nDragFullOptions |= DRAGFULL_OPTION_ALL;
 break;
 case DragFrame:
-nDragFullOptions = DRAGFULL_OPTION_NONE;
+nDragFullOptions = ((sal_uInt32)~DRAGFULL_OPTION_ALL);
 break;
 case DragSystemDep:
 default:
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 6f670fd..ed9e617 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -388,11 +388,13 @@ private:
 
 #define DRAGFULL_OPTION_WINDOWMOVE  ((sal_uLong)0x0001)
 #define DRAGFULL_OPTION_WINDOWSIZE  ((sal_uLong)0x0002)
-#define DRAGFULL_OPTION_OBJECTMOVE  ((sal_uLong)0x0004)
-#define DRAGFULL_OPTION_OBJECTSIZE  ((sal_uLong)0x0008)
 #define DRAGFULL_OPTION_DOCKING ((sal_uLong)0x0010)
 #define DRAGFULL_OPTION_SPLIT   ((sal_uLong)0x0020)
 #define DRAGFULL_OPTION_SCROLL  ((sal_uLong)0x0040)
+#define DRAGFULL_OPTION_ALL \
+( DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE  \
+| DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT  \
+| DRAGFULL_OPTION_SCROLL )
 
 #define LOGO_DISPLAYTIME_STARTTIME  ((sal_uLong)0x)
 
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 8f2d0c1..fe1456b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -221,10 +221,7 @@ ImplStyleData::ImplStyleData() :
 mnScreenZoom= 100;
 mnScreenFontZoom= 100;
 mnLogoDisplayTime   = LOGO_DISPLAYTIME_STARTTIME;
-mnDragFullOptions   = DRAGFULL_OPTION_WINDOWMOVE | 
DRAGFULL_OPTION_WINDOWSIZE |
-  DRAGFULL_OPTION_OBJECTMOVE | 
DRAGFULL_OPTION_OBJECTSIZE |
-  DRAGFULL_OPTION_DOCKING| 
DRAGFULL_OPTION_SPLIT  |
-  DRAGFULL_OPTION_SCROLL;
+mnDragFullOptions   = DRAGFULL_OPTION_ALL;
 mnAnimationOptions  = 0;
 mnSelectionOptions  = 0;
 mnDisplayOptions= 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-23 Thread Chris Sherlock
 include/vcl/svapp.hxx |   50 +++---
 1 file changed, 3 insertions(+), 47 deletions(-)

New commits:
commit 826502c7496d1fc4aef46f65f6d2dc8966245ad3
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu Jan 23 21:04:31 2014 +1100

Remove unnecessary verbiage.

Change-Id: Icf0230577a5458425f22579e8d17f69c53310812
Reviewed-on: https://gerrit.libreoffice.org/7608
Reviewed-by: Michael Meeks michael.me...@collabora.com
Tested-by: Michael Meeks michael.me...@collabora.com

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 05d982a..058f6ad 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -292,8 +292,7 @@ public:
 
 /** @} */ // end of changes
 
-/** @defgroup Initialization
-Initialization functions
+/** @defgroup Initialization Initialization functions
 @{
 */
 
@@ -607,30 +606,16 @@ public:
 @{
 */
 
-/** Overrides system settings with user settings.
+/** Sets user settings in settings object to override system settings
 
  The system settings that can be overridden are:
 - window dragging options (on or off, including live scrolling!)
-- style settings (e.g. cehckbox color, border color, 3D colors,
+- style settings (e.g. checkbox color, border color, 3D colors,
   button rollover colors, etc.)
 - mouse settings
 - menu options, including the mouse follows the menu and whether menu
   icons are used
 
- @remark One wonders why this is a virtual function when all the other
-settings options are static functions. What is it about overridding
-an AllSettings object that requires it to have it's own Application
-instance, when LibreOffice only keeps one Application instance around
-at any time?
-
-Another thing about this function is that it is a remarkably awkward
-name that doesn't \em really describe what it does.
-
- @todo Recommend that rSettings be made immutable and
-we return a new AllSettings because as it stands it would be easy to
-believe that this function changes system settings, which it does not
-as this is the job of @SetSettings.
-
  @param  rSettings  Reference to the settings object to change.
 
  @see MergeSystemSettings, SetSettings, GetSettings
@@ -640,21 +625,6 @@ public:
 /** Set the settings object to the platform/desktop environment system
  settings.
 
- @todo Incredibly, this gets the default window, then it uses whatever
-the system settings of this window are. This seems entirely 
unnecessary.
-Furthermore, to do this trick it then calls on 
@ImplUpdateGlobalSettings
-(a function of the @Window class, which in turn calls on a platform
-specific SalFrame UpdateSettings to update the settings object to the
-environment's defaults.
-
-This would be better refactored to a function that gets the 
environment's
-defaults without having to get a Window instance.
-
- @todo Recommend that rSettings be made immutable and
-we return a new AllSettings because as it stands it would be easy to
-believe that this function changes system settings, which it does not
-as this is the job of @SetSettings.
-
  @param rSettings   Reference to the settings object to change.
 
  @see SystemSettingsChanging, SetSettings, GetSettings
@@ -664,11 +634,6 @@ public:
 /** Sets the application's settings and notifies all windows of the
  change.
 
- @todo If the application hasn't initialized its settings yet, then
-currently it calls on GetSettings to initialize the settings. Recommend
-moving the initialization to a private function and call on this
-instead.
-
  @param rSettings   const reference to settings object used to
 change the application's settings.
 
@@ -680,15 +645,6 @@ public:
 /** Gets the application's settings. If the application hasn't initialized
  it's settings, then it does so (lazy initialization).
 
- @remark This is a const function. However, it can update the
-application's settings object in pSVData. Be warned!
-
- @todo  We need to call on @GetSettings to initialize the application's
-settings! This makes absolutely no sense. See @SetSettings, which does
-exactly this and doesn't care about the return value. Recommend
-moving this initialization code to a private function and call on
-this seperately.
-
  @returns AllSettings instance that contains the current settings of the
 application.
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-26 Thread Chris Sherlock
 vcl/inc/svdata.hxx |5 
 vcl/source/window/clipping.cxx |  261 +++
 vcl/source/window/stacking.cxx |   34 +++--
 vcl/source/window/window.cxx   |  256 +++---
 vcl/source/window/window2.cxx  |  272 -
 5 files changed, 414 insertions(+), 414 deletions(-)

New commits:
commit 467a0d624df1a62b8fa2b28d587c0b42ea3b3e04
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue May 27 00:52:54 2014 +1000

vcl: move clipping functions from window.cxx into clipping.cxx

Change-Id: I2a2c3d6283c962bba2994de04bbd869a79fc2eca

diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 6c09c57..4659ee2 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -18,12 +18,16 @@
  */
 
 #include vcl/window.hxx
+#include vcl/virdev.hxx
 
 #include sal/types.h
 
 #include salobj.hxx
 #include window.h
 
+#define IMPL_MAXSAVEBACKSIZE(640*480)
+#define IMPL_MAXALLSAVEBACKSIZE (800*600*2)
+
 void Window::InitClipRegion()
 {
 DBG_TESTSOLARMUTEX();
@@ -792,4 +796,175 @@ bool Window::ImplIsWindowInFront( const Window* 
pTestWindow ) const
 return false;
 }
 
+void Window::SaveBackground( const Point rPos, const Size rSize,
+ const Point rDestOff, VirtualDevice rSaveDevice 
)
+{
+if ( mpWindowImpl-mpPaintRegion )
+{
+Region  aClip( *mpWindowImpl-mpPaintRegion );
+const Point aPixPos( LogicToPixel( rPos ) );
+
+aClip.Move( -mnOutOffX, -mnOutOffY );
+aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
+
+if ( !aClip.IsEmpty() )
+{
+const RegionaOldClip( rSaveDevice.GetClipRegion() );
+const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
+const bool  bMap = rSaveDevice.IsMapModeEnabled();
+
+// move clip region to have the same distance to DestOffset
+aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - 
aPixPos.Y() );
+
+// set pixel clip region
+rSaveDevice.EnableMapMode( false );
+rSaveDevice.SetClipRegion( aClip );
+rSaveDevice.EnableMapMode( bMap );
+rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
+rSaveDevice.SetClipRegion( aOldClip );
+}
+}
+else
+rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
+}
+
+void Window::ImplSaveOverlapBackground()
+{
+DBG_ASSERT( !mpWindowImpl-mpOverlapData-mpSaveBackDev, 
Window::ImplSaveOverlapBackground() - Background already saved );
+
+if ( !mpWindowImpl-mbFrame )
+{
+sal_uLong nSaveBackSize = mnOutWidth*mnOutHeight;
+if ( nSaveBackSize = IMPL_MAXSAVEBACKSIZE )
+{
+if ( nSaveBackSize+mpWindowImpl-mpFrameData-mnAllSaveBackSize = 
IMPL_MAXALLSAVEBACKSIZE )
+{
+Size aOutSize( mnOutWidth, mnOutHeight );
+mpWindowImpl-mpOverlapData-mpSaveBackDev = new 
VirtualDevice( *mpWindowImpl-mpFrameWindow );
+if ( 
mpWindowImpl-mpOverlapData-mpSaveBackDev-SetOutputSizePixel( aOutSize ) )
+{
+mpWindowImpl-mpFrameWindow-ImplUpdateAll();
+
+if ( mpWindowImpl-mbInitWinClipRegion )
+ImplInitWinClipRegion();
+
+mpWindowImpl-mpOverlapData-mnSaveBackSize = 
nSaveBackSize;
+mpWindowImpl-mpFrameData-mnAllSaveBackSize += 
nSaveBackSize;
+Point aDevPt;
+
+OutputDevice *pOutDev = 
mpWindowImpl-mpFrameWindow-GetOutDev();
+pOutDev-ImplGetFrameDev( Point( mnOutOffX, mnOutOffY ),
+  aDevPt, aOutSize,
+  
*(mpWindowImpl-mpOverlapData-mpSaveBackDev) );
+mpWindowImpl-mpOverlapData-mpNextBackWin = 
mpWindowImpl-mpFrameData-mpFirstBackWin;
+mpWindowImpl-mpFrameData-mpFirstBackWin = this;
+}
+else
+{
+delete mpWindowImpl-mpOverlapData-mpSaveBackDev;
+mpWindowImpl-mpOverlapData-mpSaveBackDev = NULL;
+}
+}
+}
+}
+}
+
+bool Window::ImplRestoreOverlapBackground( Region rInvRegion )
+{
+if ( mpWindowImpl-mpOverlapData-mpSaveBackDev )
+{
+if ( mpWindowImpl-mbInitWinClipRegion )
+ImplInitWinClipRegion();
+
+if ( mpWindowImpl-mpOverlapData-mpSaveBackDev )
+{
+Point   aDevPt;
+Point   aDestPt( mnOutOffX, mnOutOffY );
+SizeaDevSize = 
mpWindowImpl-mpOverlapData-mpSaveBackDev-GetOutputSizePixel();
+
+OutputDevice *pOutDev = mpWindowImpl-mpFrameWindow-GetOutDev();
+
+if ( mpWindowImpl-mpOverlapData

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

2014-05-30 Thread Chris Sherlock
 vcl/source/window/window.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c4f425e691ba4a0757bea6792d02ae92a2975832
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat May 31 00:44:48 2014 +1000

vcl: make Window::Show() if statement a little easier to read

Change-Id: I3b4d88f8e0a2f378878f29fbf799b795018b18b3

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e04652a..a3146d9 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2338,7 +2338,9 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags )
 // eg, the drop down of a combobox which is a system floating window
 if( mpWindowImpl-mbFrame  GetParent()  
GetParent()-IsCompoundControl() 
 GetParent()-IsNativeWidgetEnabled() != IsNativeWidgetEnabled() )
+{
 EnableNativeWidget( GetParent()-IsNativeWidgetEnabled() );
+}
 
 if ( mpWindowImpl-mbCallMove )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-01 Thread Chris Sherlock
 vcl/inc/window.h |  146 +++
 1 file changed, 73 insertions(+), 73 deletions(-)

New commits:
commit f1d38f2a92d8e1c0a390f91b9725892e208119ed
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Jun 1 16:10:23 2014 +1000

vcl: cleanup window.h

Change-Id: Iea8323382f889705681236e364a9ef8b744fa9f2

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index d42eeb2..d8c864b 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -96,77 +96,77 @@ bool ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, 
sal_uInt16 nEvent, co
 struct ImplWinData
 {
 OUString*   mpExtOldText;
-sal_uInt16* mpExtOldAttrAry;
+sal_uInt16* mpExtOldAttrAry;
 Rectangle*  mpCursorRect;
 longmnCursorExtWidth;
-boolmbVertical;
+boolmbVertical;
 Rectangle*  mpCompositionCharRects;
 longmnCompositionCharRects;
 Rectangle*  mpFocusRect;
 Rectangle*  mpTrackRect;
-sal_uInt16  mnTrackFlags;
-sal_uInt16  mnIsTopWindow;
-boolmbMouseOver;  // tracks mouse over for native 
widget paint effect
-boolmbEnableNativeWidget; // toggle native widget rendering
+sal_uInt16  mnTrackFlags;
+sal_uInt16  mnIsTopWindow;
+boolmbMouseOver;// tracks mouse over for 
native widget paint effect
+boolmbEnableNativeWidget;   // toggle native widget 
rendering
 ::std::list Window* 
 maTopWindowChildren;
 };
 
 struct ImplOverlapData
 {
-VirtualDevice*  mpSaveBackDev;  // saved background bitmap
-Region* mpSaveBackRgn;  // saved region, which must be 
invalidated
-Window* mpNextBackWin;  // next window with saved 
background
-sal_uIntPtr mnSaveBackSize; // bitmap size of saved background
-boolmbSaveBack; // sal_True: save background
-sal_uInt8   mnTopLevel; // Level for Overlap-Window
+VirtualDevice*  mpSaveBackDev;  // saved background bitmap
+Region* mpSaveBackRgn;  // saved region, which must 
be invalidated
+Window* mpNextBackWin;  // next window with saved 
background
+sal_uIntPtr mnSaveBackSize; // bitmap size of saved 
background
+boolmbSaveBack; // true: save background
+sal_uInt8   mnTopLevel; // Level for Overlap-Window
 };
 
 struct ImplFrameData
 {
-Timer   maPaintTimer;   // paint timer
-Timer   maResizeTimer;  // resize timer
-InputContextmaOldInputContext;  // last set Input Context
-Window* mpNextFrame;// next frame window
-Window* mpFirstOverlap; // first overlap window
-Window* mpFocusWin; // focus window (is also set, when 
frame doesn't have the focous)
-Window* mpMouseMoveWin; // last window, where MouseMove() 
called
-Window* mpMouseDownWin; // last window, where 
MouseButtonDown() called
-Window* mpFirstBackWin; // first overlap-window with saved 
background
-::std::vectorWindow * maOwnerDrawList; // List of system windows with 
owner draw decoration
-PhysicalFontCollection* mpFontCollection; // Font-List for this 
frame
-ImplFontCache*  mpFontCache;// Font-Cache for this frame
-sal_Int32   mnDPIX; // Original Screen Resolution
-sal_Int32   mnDPIY; // Original Screen Resolution
-ImplMapRes  maMapUnitRes;   // for LogicUnitToPixel
-sal_uIntPtr mnAllSaveBackSize;  // size of all bitmaps of saved 
backgrounds
-ImplSVEvent *   mnFocusId;  // FocusId for PostUserLink
-ImplSVEvent *   mnMouseMoveId;  // MoveId for PostUserLink
-longmnLastMouseX;   // last x mouse position
-longmnLastMouseY;   // last y mouse position
-longmnBeforeLastMouseX; // last but one x mouse position
-longmnBeforeLastMouseY; // last but one y mouse position
-longmnFirstMouseX;  // first x mouse position by 
mousebuttondown
-longmnFirstMouseY;  // first y mouse position by 
mousebuttondown
-longmnLastMouseWinX;// last x mouse position, rel. to 
pMouseMoveWin
-longmnLastMouseWinY;// last y mouse position, rel. to 
pMouseMoveWin
-sal_uInt16  mnModalMode;// frame based modal count (app 
based makes no sense anymore)
-sal_uIntPtr mnMouseDownTime;// mouse button down time for 
double click

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

2014-09-10 Thread Chris Sherlock
 vcl/inc/unx/gtk/gtkgdi.hxx   |1 +
 vcl/source/gdi/bitmapex.cxx  |3 ++-
 vcl/source/window/brdwin.cxx |   21 -
 vcl/source/window/window.cxx |3 ---
 vcl/source/window/winproc.cxx|   11 ++-
 vcl/unx/gtk/app/gtkinst.cxx  |6 +++---
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |9 +
 vcl/unx/gtk/window/gtksalframe.cxx   |5 ++---
 8 files changed, 19 insertions(+), 40 deletions(-)

New commits:
commit 8e174eab91acec0f1578af4dac23be76dce700af
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Wed Sep 10 20:13:13 2014 +1000

vcl: BitmapEx now states which icon theme is being used for missing image

Change-Id: I83b9c86685f72569c0df88231458183b1ae511c8

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 7673f0b..b2d0dde 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -104,7 +104,8 @@ BitmapEx::BitmapEx( const ResId rResId ) :
 #ifdef DBG_UTIL
 OStringBuffer aErrorStr(
 BitmapEx::BitmapEx( const ResId rResId ): could not load image 
);
-aErrorStr.append(OUStringToOString(aFileName, 
RTL_TEXTENCODING_ASCII_US)).append('');
+aErrorStr.append(OUStringToOString(aFileName, 
RTL_TEXTENCODING_ASCII_US)).append( via icon theme );
+aErrorStr.append(OUStringToOString(aIconTheme, 
RTL_TEXTENCODING_ASCII_US)).append('.');
 OSL_FAIL(aErrorStr.getStr());
 #endif
 }
commit b01bbc3516b63d2772e53fef4dc016788c779612
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Sep 9 18:46:45 2014 +1000

vcl: no such thing as GtkSalInstance, remove commented code

Change-Id: I6627363aea34570b5f7d118b1d64b6a2d93c19cb

diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 042d541..1ca67f1 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -108,10 +108,10 @@ extern C
 gdk_threads_init();
 
 GtkInstance* pInstance = new GtkInstance( pYieldMutex );
-SAL_INFO(vcl.gtk, creating GtkSalInstance   pInstance);
+SAL_INFO(vcl.gtk, creating GtkInstance   pInstance);
 
-//Create SalData, this does not leak
-/*GtkData *pSalData =*/ new GtkData( pInstance );
+// Create SalData, this does not leak
+new GtkData( pInstance );
 
 return pInstance;
 }
commit 99f58dc2a6d9d2976948b2fe01b1ed1ae63d685e
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue Sep 9 18:32:41 2014 +1000

vcl: remove dead code and useless task comments from winproc.cxx

Change-Id: I10e4a0aa23fe83fa0f2edd671b321fa4588c880f

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c4dac53..197a173 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -101,11 +101,7 @@ static bool ImplHandleMouseFloatMode( Window* pChild, 
const Point rMousePos,
 pLastLevelFloat = 
pSVData-maWinData.mpFirstFloat-ImplFindLastLevelFloat();
 nPopupFlags = pLastLevelFloat-GetPopupModeFlags();
 pLastLevelFloat-EndPopupMode( 
FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
-// Erstmal ausgebaut als Hack fuer Bug 53378
-//if ( nPopupFlags  
FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK )
-//return false;
-//else
-return true;
+return true;
 }
 else if ( nHitTest == HITTEST_RECT )
 {
@@ -550,7 +546,6 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 
nSVEvent, bool bMouseLeav
 if ( !ImplCallPreNotify( aNLeaveEvt ) )
 {
 pMouseMoveWin-MouseMove( aMLeaveEvt );
-// #82968#
 if( !aDelData.IsDead() )
 
aNLeaveEvt.GetWindow()-ImplNotifyKeyMouseCommandEventListeners( aNLeaveEvt );
 }
@@ -747,7 +742,6 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 
nSVEvent, bool bMouseLeav
 }
 }
 
-// #82968#
 if ( !aDelData.IsDead() )
 aNEvt.GetWindow()-ImplNotifyKeyMouseCommandEventListeners( aNEvt 
);
 }
@@ -1038,7 +1032,6 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 
nSVEvent,
 pChild-ImplGetWindowImpl()-mbKeyUp = false;
 pChild-KeyUp( aKeyEvt );
 }
-// #82968#
 if( !aDelData.IsDead() )
 aNotifyEvt.GetWindow()-ImplNotifyKeyMouseCommandEventListeners( 
aNotifyEvt );
 }
@@ -1152,7 +1145,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 
nSVEvent,
 pChild-ImplGetWindowImpl()-mbKeyUp = false;
 pChild-KeyUp( aKEvt );
 }
-// #82968

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

2014-09-11 Thread Chris Sherlock
 vcl/source/gdi/impimagetree.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8cf6ba8a28f2c22817e94185121190f082c75754
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu Sep 11 18:50:38 2014 +1000

minor whitespace change

Change-Id: I556a68a2da770080e475a4e6619722fd721101ca

diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 9ba36df..e81bafe 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -158,11 +158,12 @@ bool ImplImageTree::doLoadImage(
 }
 std::vector OUString  paths;
 paths.push_back(getRealImageName(name));
+
 if (localized) {
 sal_Int32 pos = name.lastIndexOf('/');
 if (pos != -1) {
 // find() uses a reverse iterator, so push in reverse order.
-std::vector OUString  aFallbacks( 
Application::GetSettings().GetUILanguageTag().getFallbackStrings( true));
+std::vector OUString  aFallbacks( 
Application::GetSettings().GetUILanguageTag().getFallbackStrings(true));
 for (std::vector OUString ::reverse_iterator it( 
aFallbacks.rbegin());
 it != aFallbacks.rend(); ++it)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Missing image warning

2014-09-12 Thread Chris Sherlock
OK, so it looks like a commit was made to attempt to fix this for fdo#83315
- cf https://bugs.freedesktop.org/show_bug.cgi?id=83315 in commit here:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1387027aa9acf9e62f2d7bf50f71a5889626d194

However, I don't think this is a proper resolution because the actual
problem is that the statusbar doesn't show an image to say that the
certificate has a problem!

Tango has a security-low icon, but we don't seem to have it. How do we add
this, if at all possible?

Chris

On Fri, Sep 12, 2014 at 12:55 AM, Chris Sherlock chris.sherloc...@gmail.com
 wrote:

 Hi all,

 I'm getting the following warning in a debug build of master:

 warn:legacy.osl:28252:1:vcl/source/gdi/bitmapex.cxx:109:
 BitmapEx::BitmapEx( const ResId rResId ): could not load image
 svx/res/notcertificate_16.png via icon theme tango.

 The BitmapEx constructor that utilizes resources is trying to locate this,
 but calls on ImplImageTree::loadImage with the default parameter
 loadMissing set to false, which means it doesn't substitute a default image
 for the missing PNG.

 Can someone explain how the icon themes are meant to work? How does it
 detect tango as the theme and is there meant to be fallback code?

 Also, can we repackage the tango theme to include this image? It's being
 called by a security statusbar I believe, but I have no idea where abouts
 this is in the UI for writer.

 Thanks,
 Chris

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


Re: Missing image warning

2014-09-12 Thread Chris Sherlock
That's odd... I'm still not seeing it :(

I'm recompiling again, perhaps something has gone wrong on my local system.

I can't see where in the code it goes to a fallback theme. Any pointers?

Chris

On Fri, Sep 12, 2014 at 8:45 PM, Maxim Monastirsky momonas...@gmail.com
wrote:

 Hi Chris,

 On Friday 12 September 2014 20:26:12 Chris Sherlock wrote:
  OK, so it looks like a commit was made to attempt to fix this for
 fdo#83315
  - cf https://bugs.freedesktop.org/show_bug.cgi?id=83315 in commit here:
 
 
 http://cgit.freedesktop.org/libreoffice/core/commit/?id=1387027aa9acf9e62f2d
  7bf50f71a5889626d194
 
  However, I don't think this is a proper resolution because the actual
  problem is that the statusbar doesn't show an image to say that the
  certificate has a problem!
 After this commit it does show the icon in the statusbar for me (taking it
 from Galaxy as a fallback).

 Maxim

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


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

2014-09-12 Thread Chris Sherlock
 vcl/inc/salframe.hxx |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit e7791a9f30f92fd385336e30d829afb5f09d6115
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Sep 13 10:18:26 2014 +1000

vcl: tabify salframe.hxx

Change-Id: I53ad4992c6901e3dceae453699c2da785feb21a5

diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index e4882ff..c527c12 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -115,7 +115,7 @@ public:
 
 // Event must be destroyed, when Frame is destroyed
 // When Event is called, SalInstance::Yield() must be returned
-virtual boolPostEvent( void* pData ) = 0;
+virtual boolPostEvent( void* pData ) = 0;
 
 virtual voidSetTitle( const OUString rTitle ) = 0;
 virtual voidSetIcon( sal_uInt16 nIcon ) = 0;
@@ -142,7 +142,7 @@ public:
 const SalFrameGeometry GetUnmirroredGeometry() const { return maGeometry; 
}
 
 virtual voidSetWindowState( const SalFrameState* pState ) = 0;
-virtual boolGetWindowState( SalFrameState* pState ) = 0;
+virtual boolGetWindowState( SalFrameState* pState ) = 0;
 virtual voidShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) = 0;
 
 // Enable/Disable ScreenSaver, SystemAgents, ...
@@ -173,7 +173,7 @@ public:
 // returns in 'rKeyCode' the single keycode that translates to the given 
unicode when using a keyboard layout of language 'aLangType'
 // returns false if no mapping exists or function not supported
 // this is required for advanced menu support
-virtual boolMapUnicodeToKeyCode( sal_Unicode aUnicode, 
LanguageType aLangType, vcl::KeyCode rKeyCode ) = 0;
+virtual boolMapUnicodeToKeyCode( sal_Unicode aUnicode, 
LanguageType aLangType, vcl::KeyCode rKeyCode ) = 0;
 
 // returns the input language used for the last key stroke
 // may be LANGUAGE_DONTKNOW if not supported by the OS
@@ -233,8 +233,7 @@ public:
 { m_pWindow = pWindow; m_pProc = pProc; }
 
 // returns the instance set
-Window* GetWindow() const
-{ return m_pWindow; }
+Window* GetWindow() const { return m_pWindow; }
 
 // Call the callback set; this sometimes necessary for implementation 
classes
 // that should not know more than necessary about the SalFrame 
implementation
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-12 Thread Chris Sherlock
 vcl/inc/salobj.hxx |   34 ++
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 4016f792c851d6746ce65917c787fc5269f2e752
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Sep 13 10:41:10 2014 +1000

vcl: tabify salobj.hxx and fix initial comment

Change-Id: I89e60f743c5af8b5fa0f3df779f240945af40c07

diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx
index afe10e6..915502d 100644
--- a/vcl/inc/salobj.hxx
+++ b/vcl/inc/salobj.hxx
@@ -27,7 +27,7 @@
 
 struct SystemEnvData;
 
-// - SalObject-Types -
+// SalObject types
 
 #define SAL_OBJECT_CLIP_INCLUDERECTS((sal_uInt16)0x0001)
 #define SAL_OBJECT_CLIP_EXCLUDERECTS((sal_uInt16)0x0002)
@@ -40,11 +40,11 @@ class VCL_PLUGIN_PUBLIC SalObject
 boolm_bMouseTransparent:1,
 m_bEraseBackground:1;
 public:
-SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( 
false ), m_bEraseBackground( true ) {}
-virtual ~SalObject();
+SalObject() : m_pInst( NULL ), m_pCallback( NULL ), 
m_bMouseTransparent( false ), m_bEraseBackground( true ) {}
+virtual ~SalObject();
 
 virtual voidResetClipRegion() = 0;
-virtual sal_uInt16  GetClipRegionType() = 0;
+virtual sal_uInt16  GetClipRegionType() = 0;
 virtual voidBeginSetClipRegion( sal_uLong nRects ) = 0;
 virtual voidUnionClipRegion( long nX, long nY, long 
nWidth, long nHeight ) = 0;
 virtual voidEndSetClipRegion() = 0;
@@ -61,18 +61,20 @@ public:
 
 virtual const SystemEnvData*GetSystemData() const = 0;
 
-voidSetCallback( void* pInst, SALOBJECTPROC pProc )
-{ m_pInst = pInst; m_pCallback = pProc; }
-longCallCallback( sal_uInt16 nEvent, const void* 
pEvent )
-{ return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; }
-voidSetMouseTransparent( bool bMouseTransparent )
-{ m_bMouseTransparent = bMouseTransparent; }
-boolIsMouseTransparent()
-{ return m_bMouseTransparent; }
-voidEnableEraseBackground( bool bEnable )
-{ m_bEraseBackground = bEnable; }
-boolIsEraseBackgroundEnabled()
-{ return m_bEraseBackground; }
+voidSetCallback( void* pInst, SALOBJECTPROC 
pProc )
+{ m_pInst = pInst; m_pCallback = 
pProc; }
+longCallCallback( sal_uInt16 nEvent, const 
void* pEvent )
+{ return m_pCallback ? m_pCallback( 
m_pInst, this, nEvent, pEvent ) : 0; }
+
+voidSetMouseTransparent( bool 
bMouseTransparent )
+{ m_bMouseTransparent = 
bMouseTransparent; }
+boolIsMouseTransparent()
+{ return m_bMouseTransparent; }
+
+voidEnableEraseBackground( bool bEnable )
+{ m_bEraseBackground = bEnable; }
+boolIsEraseBackgroundEnabled()
+{ return m_bEraseBackground; }
 };
 
 #endif // INCLUDED_VCL_INC_SALOBJ_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-12 Thread Chris Sherlock
 vcl/inc/salvd.hxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit deeeb88f37170860366ef5ba25c96016917e1f30
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Sep 13 10:43:46 2014 +1000

vcl: tabify salvd.hxx

Change-Id: Ifb52f18f34f510b60292fc80e3e47b2ff45b841c

diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx
index 0cac639..f5a63ee 100644
--- a/vcl/inc/salvd.hxx
+++ b/vcl/inc/salvd.hxx
@@ -37,13 +37,13 @@ public:
 virtual voidReleaseGraphics( SalGraphics* pGraphics ) = 0;
 
 // Set new size, without saving the old contents
-virtual boolSetSize( long nNewDX, long nNewDY ) = 0;
+virtual boolSetSize( long nNewDX, long nNewDY ) = 0;
 
 // Set new size using a buffer at the given address
-virtual boolSetSizeUsingBuffer( long nNewDX, long nNewDY,
-const 
basebmp::RawMemorySharedArray  /* pBuffer */,
-const bool /* bTopDown */
-  )
+virtual boolSetSizeUsingBuffer( long nNewDX, long nNewDY,
+const 
basebmp::RawMemorySharedArray  /* pBuffer */,
+const bool /* bTopDown */
+  )
 {
 // Only the headless virtual device has an implementation that uses
 // pBuffer (and bTopDown).
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/osx vcl/unx vcl/win

2014-09-13 Thread Chris Sherlock
 vcl/headless/svpframe.cxx   |4 
 vcl/inc/headless/svpframe.hxx   |1 -
 vcl/inc/osx/salframe.h  |1 -
 vcl/inc/salframe.hxx|2 +-
 vcl/inc/unx/gtk/gtkframe.hxx|1 -
 vcl/inc/unx/salframe.h  |1 -
 vcl/inc/win/salframe.h  |1 -
 vcl/osx/salframe.cxx|4 
 vcl/unx/generic/window/salframe.cxx |5 -
 vcl/unx/gtk/window/gtksalframe.cxx  |5 -
 vcl/win/source/window/salframe.cxx  |5 -
 11 files changed, 1 insertion(+), 29 deletions(-)

New commits:
commit 2c3844a17574590150dbfdeb8750397a85182e75
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Sep 13 13:15:23 2014 +1000

vcl: SalFrame::Enable() is not used anywhere so removing

Change-Id: I851c414aa9e95c4d2c3ddb44deb5835656d16f87

diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index d803f72..dad80d1 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -249,10 +249,6 @@ void SvpSalFrame::Show( bool bVisible, bool bNoActivate )
 }
 }
 
-void SvpSalFrame::Enable( bool )
-{
-}
-
 void SvpSalFrame::SetMinClientSize( long nWidth, long nHeight )
 {
 m_nMinWidth = nWidth;
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 56f8c5f..8e0bbd4 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -90,7 +90,6 @@ public:
 
 virtual voidSetExtendedFrameStyle( SalExtStyle nExtStyle ) 
SAL_OVERRIDE;
 virtual voidShow( bool bVisible, bool bNoActivate = false 
) SAL_OVERRIDE;
-virtual voidEnable( bool bEnable ) SAL_OVERRIDE;
 virtual voidSetMinClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetMaxClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetPosSize( long nX, long nY, long nWidth, 
long nHeight, sal_uInt16 nFlags ) SAL_OVERRIDE;
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index be06137..905b089 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -119,7 +119,6 @@ public:
 virtual voidSetMenu( SalMenu* pSalMenu ) SAL_OVERRIDE;
 virtual voidDrawMenuBar() SAL_OVERRIDE;
 virtual voidShow( bool bVisible, bool bNoActivate = false 
) SAL_OVERRIDE;
-virtual voidEnable( bool bEnable ) SAL_OVERRIDE;
 virtual voidSetMinClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetMaxClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetPosSize( long nX, long nY, long nWidth, 
long nHeight, sal_uInt16 nFlags ) SAL_OVERRIDE;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index c527c12..1d9eed7 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -128,7 +128,7 @@ public:
 // Before the window is visible, a resize event
 // must be sent with the correct size
 virtual voidShow( bool bVisible, bool bNoActivate = false ) = 
0;
-virtual voidEnable( bool bEnable ) = 0;
+
 // Set ClientSize and Center the Window to the desktop
 // and send/post a resize message
 virtual voidSetMinClientSize( long nWidth, long nHeight ) = 0;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index fe99834..d1bd4fb 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -367,7 +367,6 @@ public:
 // Before the window is visible, a resize event
 // must be sent with the correct size
 virtual voidShow( bool bVisible, bool bNoActivate = false 
) SAL_OVERRIDE;
-virtual voidEnable( bool bEnable ) SAL_OVERRIDE;
 // Set ClientSize and Center the Window to the desktop
 // and send/post a resize message
 virtual voidSetMinClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 000ffba..bd37f91 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -225,7 +225,6 @@ public:
 
 virtual voidSetExtendedFrameStyle( SalExtStyle nExtStyle ) 
SAL_OVERRIDE;
 virtual voidShow( bool bVisible, bool bNoActivate = false 
) SAL_OVERRIDE;
-virtual voidEnable( bool bEnable ) SAL_OVERRIDE;
 virtual voidSetMinClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetMaxClientSize( long nWidth, long nHeight ) 
SAL_OVERRIDE;
 virtual voidSetPosSize( long nX, long nY, long nWidth, 
long nHeight, sal_uInt16 nFlags ) SAL_OVERRIDE;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 7389f67..a94cca5 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -96,7 +96,6 @@ public:
 virtual

[Libreoffice-commits] core.git: vcl/generic vcl/headless vcl/inc vcl/quartz vcl/source vcl/unx vcl/win

2014-09-15 Thread Chris Sherlock
 vcl/generic/print/genpspgraphics.cxx |2 +-
 vcl/headless/svptext.cxx |2 +-
 vcl/inc/generic/genpspgraphics.h |2 +-
 vcl/inc/headless/svpgdi.hxx  |2 +-
 vcl/inc/quartz/salgdi.h  |4 ++--
 vcl/inc/salgdi.hxx   |2 +-
 vcl/inc/unx/salgdi.h |2 +-
 vcl/inc/win/salgdi.h |4 ++--
 vcl/quartz/salgdi.cxx|2 +-
 vcl/source/outdev/font.cxx   |2 +-
 vcl/unx/generic/gdi/salgdi3.cxx  |2 +-
 vcl/win/source/gdi/salgdi3.cxx   |6 +++---
 12 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 4a96ee8eb29dd04ca553cbf150117789eeea1c9c
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Sep 15 19:58:17 2014 +1000

vcl: Rename GetImplFontCapabilities()

The data structure is not ImplFontCapabilities but FontCapabilities,
therefore the function name is very misleading.

Change-Id: I90f074902af4b4bee79cd445036dc24797836ac1
Reviewed-on: https://gerrit.libreoffice.org/11454
Reviewed-by: Chris Sherlock chris.sherloc...@gmail.com
Tested-by: Chris Sherlock chris.sherloc...@gmail.com

diff --git a/vcl/generic/print/genpspgraphics.cxx 
b/vcl/generic/print/genpspgraphics.cxx
index c09da8f..c8f1015 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -786,7 +786,7 @@ const ImplFontCharMap* GenPspGraphics::GetImplFontCharMap() 
const
 return pIFCMap;
 }
 
-bool GenPspGraphics::GetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const
+bool GenPspGraphics::GetFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const
 {
 if (!m_pServerFont[0])
 return false;
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 49b1464..3f2384c 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -240,7 +240,7 @@ const ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() 
const
 return pIFCMap;
 }
 
-bool SvpSalGraphics::GetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const
+bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const
 {
 if (!m_pServerFont[0])
 return false;
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index 9cc4766..5eb3477 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -90,7 +90,7 @@ public:
 virtual sal_uInt16  SetFont( FontSelectPattern*, int nFallbackLevel ) 
SAL_OVERRIDE;
 virtual voidGetFontMetric( ImplFontMetricData*, int 
nFallbackLevel ) SAL_OVERRIDE;
 virtual const ImplFontCharMap* GetImplFontCharMap() const SAL_OVERRIDE;
-virtual boolGetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const SAL_OVERRIDE;
+virtual boolGetFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const SAL_OVERRIDE;
 virtual voidGetDevFontList( PhysicalFontCollection* ) 
SAL_OVERRIDE;
 // graphics must drop any cached font info
 virtual voidClearDevFontCache() SAL_OVERRIDE;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 800ab1a..57e3ce8 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -157,7 +157,7 @@ public:
 virtual sal_uInt16  SetFont( FontSelectPattern*, int nFallbackLevel ) 
SAL_OVERRIDE;
 virtual voidGetFontMetric( ImplFontMetricData*, int 
nFallbackLevel ) SAL_OVERRIDE;
 virtual const ImplFontCharMap* GetImplFontCharMap() const SAL_OVERRIDE;
-virtual bool GetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const SAL_OVERRIDE;
+virtual bool GetFontCapabilities(vcl::FontCapabilities rFontCapabilities) 
const SAL_OVERRIDE;
 virtual voidGetDevFontList( PhysicalFontCollection* ) 
SAL_OVERRIDE;
 virtual void ClearDevFontCache() SAL_OVERRIDE;
 virtual boolAddTempDevFont( PhysicalFontCollection*, const 
OUString rFileURL, const OUString rFontName ) SAL_OVERRIDE;
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 57dec5b..1fdacb3 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -75,7 +75,7 @@ public:
 int GetFontTable( const char pTagName[5], unsigned char* ) 
const;
 
 const ImplFontCharMap*  GetImplFontCharMap() const;
-boolGetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const;
+boolGetFontCapabilities(vcl::FontCapabilities 
rFontCapabilities) const;
 boolHasChar( sal_uInt32 cChar ) const;
 
 voidReadOs2Table() const;
@@ -332,7 +332,7 @@ public:
 virtual voidGetFontMetric( ImplFontMetricData*, int 
nFallbackLevel ) SAL_OVERRIDE;
 // get the repertoire of the current font
 virtual const ImplFontCharMap* GetImplFontCharMap() const

FontCharMap change - request for comment

2014-09-24 Thread Chris Sherlock
Hi all,

As many of you know, I'm particularly interested in VCL and how it fits
together. One thing I've noticed is that a lot of VCL classes have their
own built-in reference counting code.

I am interested in changing this situation. In
https://gerrit.libreoffice.org/#/c/11565/4 I used a shared_ptr, but I have
since switched to use boost's intrusive_ptr

I am interested in someone looking at my general approach. In a nutshell, I
have kept a reference counter variable in FontCharMap, and merged
ImplFontCharMap with FontCharMap. I have also used a typedef
PtrFontCharMap, which is intrusive_ptrFontCharMap.

I would love to see some comments, good or bad so that I can start rolling
out this sort of thing to other parts of the VCL module.

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


Re: stack-allocated Window subclasses

2014-09-24 Thread Chris Sherlock
Oh, I just saw this email.

I recently posted a gerrit change for review around FontCharMap, you can
find it here:

https://gerrit.libreoffice.org/#/c/11565/

I've never looked at what Reference actually does, but now that I do it
seems that it relies on a class that exposes an acquire() and release()
function - and a set function that I *think* is the equivalent of swap().
Seems very similar to what intrusive_ptr does.

Am I correct in my understanding?

Out of interest, what do smart pointers do, if anything, to polymorphism?
If I have an intrusive_ptr to vcl::Window, then can I cast this to
SystemWindow?

Chris

On Wed, Sep 24, 2014 at 2:19 AM, Michael Meeks michael.me...@collabora.com
wrote:

 Hi Noel,

 On Tue, 2014-09-23 at 14:52 +0200, Noel Grandin wrote:
  Otherwise we should just standardise on boost::intrusive_ptr and remove
 SvRef.

 Yep - my concern is only that boost::intrusive_ptr Window  - is
 some
 horribly long horror =) and that having some semi-standard means of
 having widget refs that are not so grim might be nicer:

 WindowRef xRef;
 vs. boost::intrusive_ptr Window  xRef;
 vs. vcl::ref Window  xRef;

 etc. but would love to hear other people's views; in general, I
 think
 fewer tokens for the mind to swallow when reading the bulk of the code
 is a good thing.

  This should be fixable if it doesn't already work - myself and sberg
  already did this for rtl::Reference.

 Nice =)

  Mostly I guess we need to figure out where and when to destroy them -
  is it in the destructor, or in some other method specific to this task?

 Of course, the ideal is to migrate these stuff incrementally. To do
 that, I'd suggest we use the new intrusive_ptr and destroy the Window in
 the normal way at the end; but that we slowly migrate all explicit
 'delete' calls to be virtual dispose calls, and split out reference
 releasing / cyclic references later.

 My hope is that all these non-heap Window's are leafs in the
 hierarchy
 anyhow and/or that we can clean them up without worrying about a proper
 'dispose' mechanism just now.

 Does that make sense ?

 ATB,

 Michael.

 --
  michael.me...@collabora.com  , Pseudo Engineer, itinerant idiot


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


Re: Missing image warning

2014-09-24 Thread Chris Sherlock
Yow, sorry Maxim - just saw this, I'm way behind on my mail.

When I checked, it didn't have the image.

Chris

On Fri, Sep 12, 2014 at 11:00 PM, Maxim Monastirsky momonas...@gmail.com
wrote:

 On Friday 12 September 2014 21:11:16 Chris Sherlock wrote:
  I can't see where in the code it goes to a fallback theme. Any pointers?
 Was surprised to discover that it's actually done at build time. Missing
 images are simply copied from galaxy to any other zip. It's specified at
 [1].
 Does your images_tango.zip have this svx/res/notcertificate_16.png inside?

 Maxim

 [1]

 http://opengrok.libreoffice.org/xref/core/postprocess/CustomTarget_images.mk#39

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


[Libreoffice-commits] core.git: Changes to 'private/tbsdy/clipping'

2014-07-19 Thread Chris Sherlock
New branch 'private/tbsdy/clipping' available with the following commits:
commit 6e14af669baf11cae91b281d17065a11512fb51d
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Jun 8 23:52:53 2014 +1000

vcl: change from clipMgr to pClipMgr

Change-Id: I7bd54761b7646c60ba40f9654adbf2a93566849c

commit 30c9d3b0caaff3b0fa92ad0dbabc4f499c5308d7
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Jun 8 23:33:44 2014 +1000

vcl: migrate rest of clipping functions from clipping.hxx into clipmgr.hxx

Change-Id: If4646d96bafb113004dd6965d26f29e2194d237e

commit 8122d35376edb660ddccde4c6765b0df196937e5
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Jun 7 01:42:15 2014 +1000

vcl: move Window::EnableClipSiblings() to ClipManager

Change-Id: I0382f2828824390503144345951b6ff6b804a467

commit b92055b44c6f8e7ba73258f636e03689186cba15
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat Jun 7 00:39:31 2014 +1000

vcl: migrate ClipCoversWholeWindow into ClipManager

I have moved Window::ClipCoversWholeWindow() into ClipManager. To do
this, I have moved clipmgr.hxx to a global header.

Change-Id: I47c830380b9750e5f3bf4ce3f824d25501317741

commit f3894bd0bd8ee9472f1ae595b9f6616ed4e4717f
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu Jun 5 01:17:48 2014 +1000

vcl: GetWindowClipRegionPixel simplified

Window::GetWindowClipRegionPixel() has a lot of unneeded functionality.
It's not being (ab)used anywhere except for SwViewShell::SmoothScroll()
which uses it to work out if clipping area covers the whole window or
not (taking into account the child clipping area).

So I've basically removed the unneeded flags, and now it doesn't return
a region, I just use it as a check to see if the clipping area covers
the whole window - hence the name change to ClipCoversWholeWindow(),
which now just returns a boolean value.

Change-Id: I182cb91d78f4a44ff5da86d768d9ece0633ae3a3

commit cc41d52af226f6c4fdfd8e300b81d0f61d633053
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 09:02:06 2014 +1000

vcl: use Set/GetParentClipMode through ClipManager

Change-Id: Ib8bb0101053ca64f59a23c1fdb14ee444f3342db

commit c0a9ecb6aec9f9bb00e07d8170e728deaa1d9ffc
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 08:43:41 2014 +1000

vcl: move ImplClipAllChildren() to ClipManager

Change-Id: I24a8d8538516992c77d4d36426979515e6ddef8a

commit f3c96bad9d9d9c8e4c51972ed09224bf0dea7f4c
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 08:29:34 2014 +1000

vcl: move ImplIntersectWindowRegion to ClipManager

Moved Window::ImplIntersectWindowRegion() to ClipManager::Intersect().

Change-Id: I1893e5934c18404427b6975f580e8f698c6c590b

commit 2b2d85e9c4d41d89f4639d02fe19475a17b62a88
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 01:44:45 2014 +1000

vcl: Move more clipping functions from Window into ClipManager

Moved:
* ImplInitWinChildClipRegion() - initChildClipRegion() - private
* ImplGetWinChildClipRegion()  - GetChildClipRegion() - public

Change-Id: Ifdee45a77181fc1c8670437ba445cdbc8e3a6140

commit fc38784de99719c2854ef9e37850d3cab7c933a5
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 01:13:08 2014 +1000

vcl: move ImplClipChildren() to ClipManager

Change-Id: I510a44ea0d746e8f0e8ba753acfe26470e4ff7e2

commit daa43dc1704e3624eb2c1dc73d4f62d9d904b005
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 00:45:26 2014 +1000

vcl: move ImplExcludeWindowRegion() to ClipManager::Exclude()

Change-Id: Iecc1f5a1289c5e56fc211f6514489bad2bd070f1

commit a5382f722ebba25944aef13ed562fa23045577f3
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 00:28:43 2014 +1000

vcl: move ImplExcludeOverlapWindows() to ClipManager

Change-Id: I50c2e7d27c7ce706ef926fe9ce90503617c7df30

commit 4e90e2f710580376274e8eb043e3efb18fe419e3
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 00:18:38 2014 +1000

vcl: remove unnecessary ImplExcludeOverlapWindows2()

Change-Id: Ie1442b1ae1944c5fe2006c1d4d50f8618fba023d

commit dd0281ca13c00af2130dba9141ad22cc971ce40e
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Jun 2 00:13:48 2014 +1000

vcl: move ImplIsOverlapWindow into ClipManager

Change-Id: I9b1224dc36ea489248bad8558c20948b5ba288a7

commit 1242044880864aba7daad9c8ee83321c4b0bbc46
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun Jun 1 21:57:04 2014 +1000

vcl: move more Window clipping functions into ClipManager

Moved ImplIntersectWindowClipRegion to ClipManager as private function
intersectClipRegion, as this is only used by ImplClipBoundaries.
ImplClipBoundaries was also moved to ClipManager

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

2014-04-28 Thread Chris Sherlock
 vcl/source/outdev/outdev.cxx  |  328 -
 vcl/source/outdev/outdevstate.cxx |  333 ++
 2 files changed, 333 insertions(+), 328 deletions(-)

New commits:
commit 0f83b6379af62a9a0556371ee82a152c7d4e93b3
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 19:25:55 2014 +1000

VCL: Move SetFont up the include file

Change-Id: I6721e78f8a10d95a54ff09c1f25f0ae3ece71cfa

diff --git a/vcl/source/outdev/outdevstate.cxx 
b/vcl/source/outdev/outdevstate.cxx
index d149542..908abc3 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -371,29 +371,6 @@ void OutputDevice::SetBackground( const Wallpaper 
rBackground )
 mpAlphaVDev-SetBackground( rBackground );
 }
 
-
-void OutputDevice::InitFillColor()
-{
-DBG_TESTSOLARMUTEX();
-
-if( mbFillColor )
-{
-if( ROP_0 == meRasterOp )
-mpGraphics-SetROPFillColor( SAL_ROP_0 );
-else if( ROP_1 == meRasterOp )
-mpGraphics-SetROPFillColor( SAL_ROP_1 );
-else if( ROP_INVERT == meRasterOp )
-mpGraphics-SetROPFillColor( SAL_ROP_INVERT );
-else
-mpGraphics-SetFillColor( ImplColorToSal( maFillColor ) );
-}
-else
-mpGraphics-SetFillColor();
-
-mbInitFillColor = false;
-}
-
-
 void OutputDevice::SetFont( const Font rNewFont )
 {
 
@@ -501,4 +478,25 @@ void OutputDevice::SetFont( const Font rNewFont )
 }
 }
 
+void OutputDevice::InitFillColor()
+{
+DBG_TESTSOLARMUTEX();
+
+if( mbFillColor )
+{
+if( ROP_0 == meRasterOp )
+mpGraphics-SetROPFillColor( SAL_ROP_0 );
+else if( ROP_1 == meRasterOp )
+mpGraphics-SetROPFillColor( SAL_ROP_1 );
+else if( ROP_INVERT == meRasterOp )
+mpGraphics-SetROPFillColor( SAL_ROP_INVERT );
+else
+mpGraphics-SetFillColor( ImplColorToSal( maFillColor ) );
+}
+else
+mpGraphics-SetFillColor();
+
+mbInitFillColor = false;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0ada64dfd99fdaa1b182f88d32e4f4c6fbd2b5f6
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 19:24:08 2014 +1000

VCL: Move SetBackground from outdev.cxx to outdevstate.cxx

Change-Id: I04bf1470e43ed08ef5759fcbd6f96d4896f7690b

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 31c5774..c0dd42a 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -821,30 +821,6 @@ Color OutputDevice::ImplDrawModeToColor( const Color 
rColor ) const
 return aColor;
 }
 
-void OutputDevice::SetBackground()
-{
-
-maBackground = Wallpaper();
-mbBackground = false;
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetBackground();
-}
-
-void OutputDevice::SetBackground( const Wallpaper rBackground )
-{
-
-maBackground = rBackground;
-
-if( rBackground.GetStyle() == WALLPAPER_NULL )
-mbBackground = false;
-else
-mbBackground = true;
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetBackground( rBackground );
-}
-
 void OutputDevice::SetRefPoint()
 {
 
diff --git a/vcl/source/outdev/outdevstate.cxx 
b/vcl/source/outdev/outdevstate.cxx
index 2fada5e..d149542 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -347,6 +347,30 @@ void OutputDevice::SetFillColor( const Color rColor )
 mpAlphaVDev-SetFillColor( COL_BLACK );
 }
 
+void OutputDevice::SetBackground()
+{
+
+maBackground = Wallpaper();
+mbBackground = false;
+
+if( mpAlphaVDev )
+mpAlphaVDev-SetBackground();
+}
+
+void OutputDevice::SetBackground( const Wallpaper rBackground )
+{
+
+maBackground = rBackground;
+
+if( rBackground.GetStyle() == WALLPAPER_NULL )
+mbBackground = false;
+else
+mbBackground = true;
+
+if( mpAlphaVDev )
+mpAlphaVDev-SetBackground( rBackground );
+}
+
 
 void OutputDevice::InitFillColor()
 {
commit d0d21235cd653d66aa877161086c474e988277b6
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 19:23:09 2014 +1000

VCL: Move SetFillColor from outdev.cxx to outdevstate.cxx

Change-Id: Ia817fbe4aa2927ac5568fd842e8f313608bed320

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index cec9f14..31c5774 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -821,91 +821,6 @@ Color OutputDevice::ImplDrawModeToColor( const Color 
rColor ) const
 return aColor;
 }
 
-void OutputDevice::SetFillColor()
-{
-
-if ( mpMetaFile )
-mpMetaFile-AddAction( new MetaFillColorAction( Color(), false ) );
-
-if ( mbFillColor )
-{
-mbInitFillColor = true;
-mbFillColor = false;
-maFillColor = Color( COL_TRANSPARENT );
-}
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetFillColor();
-}
-
-void OutputDevice::SetFillColor( const Color rColor

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

2014-04-28 Thread Chris Sherlock
 vcl/source/outdev/outdev.cxx  |   45 -
 vcl/source/outdev/outdevstate.cxx |   68 ++
 vcl/source/outdev/text.cxx|   22 
 3 files changed, 68 insertions(+), 67 deletions(-)

New commits:
commit 94d0eb659ed1310f3d2647c83db8e54184c55e23
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 20:29:21 2014 +1000

VCL move SetLayoutMode  SetDigitLanguage from font.cxx to outdevstate.cxx

Change-Id: Iaf48a39fa1d4d7b88143022e517f2c4e119e94d5

diff --git a/vcl/source/outdev/outdevstate.cxx 
b/vcl/source/outdev/outdevstate.cxx
index 7ce35cf..228620a 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -288,6 +288,28 @@ void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
 mpAlphaVDev-SetDrawMode( nDrawMode );
 }
 
+void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode )
+{
+if( mpMetaFile )
+mpMetaFile-AddAction( new MetaLayoutModeAction( nTextLayoutMode ) );
+
+mnTextLayoutMode = nTextLayoutMode;
+
+if( mpAlphaVDev )
+mpAlphaVDev-SetLayoutMode( nTextLayoutMode );
+}
+
+void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage )
+{
+if( mpMetaFile )
+mpMetaFile-AddAction( new MetaTextLanguageAction( eTextLanguage ) );
+
+meTextLanguage = eTextLanguage;
+
+if( mpAlphaVDev )
+mpAlphaVDev-SetDigitLanguage( eTextLanguage );
+}
+
 void OutputDevice::SetRasterOp( RasterOp eRasterOp )
 {
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index dd03ac4..4383e5e 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -681,28 +681,6 @@ long OutputDevice::ImplGetTextLines( 
ImplMultiTextLineInfo rLineInfo,
 return nMaxLineWidth;
 }
 
-void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode )
-{
-if( mpMetaFile )
-mpMetaFile-AddAction( new MetaLayoutModeAction( nTextLayoutMode ) );
-
-mnTextLayoutMode = nTextLayoutMode;
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetLayoutMode( nTextLayoutMode );
-}
-
-void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage )
-{
-if( mpMetaFile )
-mpMetaFile-AddAction( new MetaTextLanguageAction( eTextLanguage ) );
-
-meTextLanguage = eTextLanguage;
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetDigitLanguage( eTextLanguage );
-}
-
 void OutputDevice::SetTextColor( const Color rColor )
 {
 
commit 690b655f06af5717ecb79f0cb804342a78a6ba43
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 20:25:25 2014 +1000

VCL move SetRasterOp  SetDrawMode from outdev.cxx to outdevstate.cxx

Change-Id: I8c597e5b9049cd23223ecf4376a4449ca1effb38

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index bd2ad9a..7eb435e 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -753,34 +753,6 @@ void OutputDevice::ImplGetFrameDev( const Point rPt, 
const Point rDevPt, const
 }
 
 
-void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
-{
-
-mnDrawMode = nDrawMode;
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetDrawMode( nDrawMode );
-}
-
-void OutputDevice::SetRasterOp( RasterOp eRasterOp )
-{
-
-if ( mpMetaFile )
-mpMetaFile-AddAction( new MetaRasterOpAction( eRasterOp ) );
-
-if ( meRasterOp != eRasterOp )
-{
-meRasterOp = eRasterOp;
-mbInitLineColor = mbInitFillColor = true;
-
-if( mpGraphics || AcquireGraphics() )
-mpGraphics-SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == 
meRasterOp), ROP_INVERT == meRasterOp );
-}
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetRasterOp( eRasterOp );
-}
-
 Color OutputDevice::ImplDrawModeToColor( const Color rColor ) const
 {
 Color aColor( rColor );
diff --git a/vcl/source/outdev/outdevstate.cxx 
b/vcl/source/outdev/outdevstate.cxx
index 7a1ae46..7ce35cf 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -262,7 +262,6 @@ void OutputDevice::EnableOutput( bool bEnable )
 mpAlphaVDev-EnableOutput( bEnable );
 }
 
-
 void OutputDevice::SetAntialiasing( sal_uInt16 nMode )
 {
 if ( mnAntialiasing != nMode )
@@ -280,6 +279,34 @@ void OutputDevice::SetAntialiasing( sal_uInt16 nMode )
 mpAlphaVDev-SetAntialiasing( nMode );
 }
 
+void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
+{
+
+mnDrawMode = nDrawMode;
+
+if( mpAlphaVDev )
+mpAlphaVDev-SetDrawMode( nDrawMode );
+}
+
+void OutputDevice::SetRasterOp( RasterOp eRasterOp )
+{
+
+if ( mpMetaFile )
+mpMetaFile-AddAction( new MetaRasterOpAction( eRasterOp ) );
+
+if ( meRasterOp != eRasterOp )
+{
+meRasterOp = eRasterOp;
+mbInitLineColor = mbInitFillColor = true;
+
+if( mpGraphics || AcquireGraphics() )
+mpGraphics-SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == 
meRasterOp), ROP_INVERT == meRasterOp );
+}
+
+if( mpAlphaVDev

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

2014-04-28 Thread Chris Sherlock
 vcl/source/outdev/outdev.cxx  |   24 
 vcl/source/outdev/polygon.cxx |  100 -
 vcl/source/outdev/rect.cxx|  125 +-
 3 files changed, 123 insertions(+), 126 deletions(-)

New commits:
commit 3d91d54c49af4dd0832c27ccb9721724fa98b6b5
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 20:48:31 2014 +1000

VCL move DrawCheckered from outdev.cxx to rect.cxx

Change-Id: I55cbab29e4e0d772e593f39ba48a3a2dffbce382

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 7eb435e..5af2be3 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -985,28 +985,4 @@ bool OutputDevice::DrawEPS( const Point rPoint, const 
Size rSize,
 return bDrawn;
 }
 
-void OutputDevice::DrawCheckered(const Point rPos, const Size rSize, 
sal_uInt32 nLen, Color aStart, Color aEnd)
-{
-const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
-const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
-
-Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
-SetLineColor();
-
-for(sal_uInt32 x(0), nX(rPos.X()); nX  nMaxX; x++, nX += nLen)
-{
-const sal_uInt32 nRight(std::min(nMaxX, nX + nLen));
-
-for(sal_uInt32 y(0), nY(rPos.Y()); nY  nMaxY; y++, nY += nLen)
-{
-const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen));
-
-SetFillColor((x  0x0001) ^ (y  0x0001) ? aStart : aEnd);
-DrawRect(Rectangle(nX, nY, nRight, nBottom));
-}
-}
-
-Pop();
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 3701354..285100c 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -121,6 +121,30 @@ void OutputDevice::DrawRect( const Rectangle rRect,
 mpAlphaVDev-DrawRect( rRect, nHorzRound, nVertRound );
 }
 
+void OutputDevice::DrawCheckered(const Point rPos, const Size rSize, 
sal_uInt32 nLen, Color aStart, Color aEnd)
+{
+const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
+const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
+
+Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
+SetLineColor();
+
+for(sal_uInt32 x(0), nX(rPos.X()); nX  nMaxX; x++, nX += nLen)
+{
+const sal_uInt32 nRight(std::min(nMaxX, nX + nLen));
+
+for(sal_uInt32 y(0), nY(rPos.Y()); nY  nMaxY; y++, nY += nLen)
+{
+const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen));
+
+SetFillColor((x  0x0001) ^ (y  0x0001) ? aStart : aEnd);
+DrawRect(Rectangle(nX, nY, nRight, nBottom));
+}
+}
+
+Pop();
+}
+
 void OutputDevice::DrawGrid( const Rectangle rRect, const Size rDist, 
sal_uLong nFlags )
 {
 Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
commit db45e761df999c5435bf24fb69f3b0ec7bca16cf
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 20:47:12 2014 +1000

VCL move DrawGrid from polygon.cxx to rect.cxx

Change-Id: I55190ee8eee2a9c1cf75890b89f7100d925d

diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index cf3a073..632db7d 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -479,103 +479,4 @@ void OutputDevice::ImplDrawPolyPolygon( const 
PolyPolygon rPolyPoly, const Poly
 delete pPolyPoly;
 }
 
-void OutputDevice::DrawGrid( const Rectangle rRect, const Size rDist, 
sal_uLong nFlags )
-{
-Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
-aDstRect.Intersection( rRect );
-
-if( aDstRect.IsEmpty() || ImplIsRecordLayout() )
-return;
-
-if( !mpGraphics  !AcquireGraphics() )
-return;
-
-if( mbInitClipRegion )
-InitClipRegion();
-
-if( mbOutputClipped )
-return;
-
-const long nDistX = std::max( rDist.Width(), 1L );
-const long nDistY = std::max( rDist.Height(), 1L );
-long nX = ( rRect.Left() = aDstRect.Left() ) ? rRect.Left() : ( 
rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
-long nY = ( rRect.Top() = aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() 
+ ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
-const long nRight = aDstRect.Right();
-const long nBottom = aDstRect.Bottom();
-const long nStartX = ImplLogicXToDevicePixel( nX );
-const long nEndX = ImplLogicXToDevicePixel( nRight );
-const long nStartY = ImplLogicYToDevicePixel( nY );
-const long nEndY = ImplLogicYToDevicePixel( nBottom );
-long nHorzCount = 0L;
-long nVertCount = 0L;
-
-css::uno::Sequence sal_Int32  aVertBuf;
-css::uno::Sequence sal_Int32  aHorzBuf;
-
-if( ( nFlags  GRID_DOTS ) || ( nFlags  GRID_HORZLINES ) )
-{
-aVertBuf.realloc( aDstRect.GetHeight() / nDistY + 2L );
-aVertBuf[ nVertCount++ ] = nStartY;
-while( ( nY += nDistY ) = nBottom )
-{
-aVertBuf[ nVertCount

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

2014-04-28 Thread Chris Sherlock
 include/vcl/outdev.hxx|   15 
 include/vcl/print.hxx |2 -
 vcl/source/gdi/print.cxx  |2 -
 vcl/source/outdev/line.cxx|   69 
 vcl/source/outdev/mask.cxx|4 +-
 vcl/source/outdev/outdevstate.cxx |   71 ++
 6 files changed, 83 insertions(+), 80 deletions(-)

New commits:
commit 9a89946c95234b19ded1cecdd50bc1ddbd8f8fcb
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 22:05:43 2014 +1000

VCL: Move line functions into state areas

Change-Id: I4a92c66892fbb9687b9e7c521c770150b75229b0

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 51b40aa..9cc34e8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -570,6 +570,11 @@ public:
 voidSetOutDevViewType( OutDevViewType 
eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
 OutDevViewType  GetOutDevViewType() const { return 
meOutDevViewType; }
 
+voidSetLineColor();
+voidSetLineColor( const Color rColor );
+const ColorGetLineColor() const { return maLineColor; }
+boolIsLineColor() const { return mbLineColor; }
+
 voidSetFillColor();
 voidSetFillColor( const Color rColor );
 const ColorGetFillColor() const { return maFillColor; }
@@ -586,6 +591,8 @@ public:
 
 private:
 
+SAL_DLLPRIVATE void InitLineColor();
+
 SAL_DLLPRIVATE void InitFillColor();
 ///@}
 
@@ -669,13 +676,7 @@ public:
 voidDrawLine( const Point rStartPt, const Point 
rEndPt,
   const LineInfo rLineInfo );
 
-voidSetLineColor();
-voidSetLineColor( const Color rColor );
-const ColorGetLineColor() const { return maLineColor; }
-boolIsLineColor() const { return mbLineColor; }
-
 private:
-SAL_DLLPRIVATE void InitLineColor();
 
 /** Helper for line geometry paint with support for graphic expansion 
(pattern and fat_to_area)
  */
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index ea987fa..752bad4 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -145,75 +145,6 @@ void OutputDevice::DrawLine( const Point rStartPt, const 
Point rEndPt )
 mpAlphaVDev-DrawLine( rStartPt, rEndPt );
 }
 
-void OutputDevice::SetLineColor()
-{
-
-if ( mpMetaFile )
-mpMetaFile-AddAction( new MetaLineColorAction( Color(), false ) );
-
-if ( mbLineColor )
-{
-mbInitLineColor = true;
-mbLineColor = false;
-maLineColor = Color( COL_TRANSPARENT );
-}
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetLineColor();
-}
-
-void OutputDevice::SetLineColor( const Color rColor )
-{
-
-Color aColor = ImplDrawModeToColor( rColor );
-
-if( mpMetaFile )
-mpMetaFile-AddAction( new MetaLineColorAction( aColor, true ) );
-
-if( ImplIsColorTransparent( aColor ) )
-{
-if ( mbLineColor )
-{
-mbInitLineColor = true;
-mbLineColor = false;
-maLineColor = Color( COL_TRANSPARENT );
-}
-}
-else
-{
-if( maLineColor != aColor )
-{
-mbInitLineColor = true;
-mbLineColor = true;
-maLineColor = aColor;
-}
-}
-
-if( mpAlphaVDev )
-mpAlphaVDev-SetLineColor( COL_BLACK );
-}
-
-void OutputDevice::InitLineColor()
-{
-DBG_TESTSOLARMUTEX();
-
-if( mbLineColor )
-{
-if( ROP_0 == meRasterOp )
-mpGraphics-SetROPLineColor( SAL_ROP_0 );
-else if( ROP_1 == meRasterOp )
-mpGraphics-SetROPLineColor( SAL_ROP_1 );
-else if( ROP_INVERT == meRasterOp )
-mpGraphics-SetROPLineColor( SAL_ROP_INVERT );
-else
-mpGraphics-SetLineColor( ImplColorToSal( maLineColor ) );
-}
-else
-mpGraphics-SetLineColor();
-
-mbInitLineColor = false;
-}
-
 void OutputDevice::PaintLineGeometryWithEvtlExpand(
 const LineInfo rInfo,
 basegfx::B2DPolyPolygon aLinePolyPolygon)
diff --git a/vcl/source/outdev/outdevstate.cxx 
b/vcl/source/outdev/outdevstate.cxx
index 228620a..15c5dd6 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -415,6 +415,54 @@ void OutputDevice::SetFillColor( const Color rColor )
 mpAlphaVDev-SetFillColor( COL_BLACK );
 }
 
+void OutputDevice::SetLineColor()
+{
+
+if ( mpMetaFile )
+mpMetaFile-AddAction( new MetaLineColorAction( Color(), false ) );
+
+if ( mbLineColor )
+{
+mbInitLineColor = true;
+mbLineColor = false;
+maLineColor = Color( COL_TRANSPARENT

[Libreoffice-commits] core.git: include/vcl vcl/Library_vcl.mk

2014-04-30 Thread Chris Sherlock
 include/vcl/window.hxx |  210 -
 vcl/Library_vcl.mk |  152 +--
 2 files changed, 216 insertions(+), 146 deletions(-)

New commits:
commit 03e771f268895a3c79138dd52556d51baaad86e0
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 03:08:03 2014 +1000

VCL: Rearrange function locations and accessibility in window.hxx

A whole bunch of functions in include/vcl/window.hxx should be private,
a number should be protected. Change this now and fix some formatting
whilst I'm about it.

Change-Id: I8bae0112dcecffb7c703fe35e8db6676c1b5f584

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index fb148d9..001dfd5 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -373,92 +373,176 @@ private:
 friend const char* ImplDbgCheckWindow( const void* pObj );
 #endif
 friend Window* ImplFindWindow( const SalFrame* pFrame, Point rSalFramePos 
);
+
 public:
-SAL_DLLPRIVATE voidImplInit( Window* pParent, WinBits 
nStyle, SystemParentData* pSystemParentData );
-SAL_DLLPRIVATE WinBits ImplInitRes( const ResId rResId );
-SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader( const ResId rResId 
);
-SAL_DLLPRIVATE voidImplLoadRes( const ResId rResId );
+
+DECL_DLLPRIVATE_LINK(  ImplHandlePaintHdl, void* );
+DECL_DLLPRIVATE_LINK(  ImplGenerateMouseMoveHdl, void* );
+DECL_DLLPRIVATE_LINK(  ImplTrackTimerHdl, Timer* );
+DECL_DLLPRIVATE_LINK(  ImplAsyncFocusHdl, void* );
+DECL_DLLPRIVATE_LINK(  ImplHandleResizeTimerHdl, void* );
+DECL_DLLPRIVATE_LINK(  ImplHideOwnerDrawWindowsHdl, void* );
+
+
+SAL_DLLPRIVATE static void  ImplInitAppFontData( Window* pWindow );
+
+SAL_DLLPRIVATE Window*  ImplGetFrameWindow() const;
+SalFrame*   ImplGetFrame() const;
+SAL_DLLPRIVATE ImplFrameData*   ImplGetFrameData();
+
+SAL_DLLPRIVATE Window*  ImplGetWindow();
+SAL_DLLPRIVATE ImplWinData* ImplGetWinData() const;
+SAL_DLLPRIVATE Window*  ImplGetClientWindow() const;
+SAL_DLLPRIVATE Window*  ImplGetDlgWindow( sal_uInt16 n, 
sal_uInt16 nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0x, sal_uInt16* 
pIndex = NULL );
+SAL_DLLPRIVATE Window*  ImplGetParent() const;
+SAL_DLLPRIVATE Window*  ImplFindWindow( const Point rFramePos 
);
+
+SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const 
Region* pRegion, sal_uInt16 nFlags );
+SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( 
const Region rRegion );
+
+SAL_DLLPRIVATE bool ImplSetClipFlag( bool 
bSysObjOnlySmaller = false );
+
+SAL_DLLPRIVATE bool ImplIsWindowOrChild( const Window* 
pWindow, bool bSystemWindow = false ) const;
+SAL_DLLPRIVATE bool ImplIsChild( const Window* pWindow, 
bool bSystemWindow = false ) const;
+SAL_DLLPRIVATE bool ImplIsFloatingWindow() const;
+SAL_DLLPRIVATE bool ImplIsPushButton() const;
+SAL_DLLPRIVATE bool ImplIsSplitter() const;
+SAL_DLLPRIVATE bool ImplIsDockingWindow() const;
+SAL_DLLPRIVATE bool ImplIsOverlapWindow() const;
+
+SAL_DLLPRIVATE void ImplIsInTaskPaneList( bool 
mbIsInTaskList );
+
+SAL_DLLPRIVATE WindowImpl*  ImplGetWindowImpl() const { return 
mpWindowImpl; }
+
+SAL_DLLPRIVATE PointImplFrameToOutput( const Point rPos );
+
+SAL_DLLPRIVATE void ImplGrabFocus( sal_uInt16 nFlags );
+SAL_DLLPRIVATE void ImplGrabFocusToDocument( sal_uInt16 
nFlags );
+SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle 
rRect );
+
+SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const;
+SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 
nMouseCode, bool bModChanged = false );
+SAL_DLLPRIVATE void ImplGenerateMouseMove();
+
+SAL_DLLPRIVATE void 
ImplNotifyKeyMouseCommandEventListeners( NotifyEvent rNEvt );
+SAL_DLLPRIVATE void ImplNotifyIconifiedState( bool 
bIconified );
+
+SAL_DLLPRIVATE void ImplUpdateAll( bool bOverlapWindows = 
true );
+
+SAL_DLLPRIVATE void ImplDeleteOverlapBackground();
+
+SAL_DLLPRIVATE void ImplControlFocus( sal_uInt16 nFlags = 
0 );
+
+SAL_DLLPRIVATE void ImplMirrorFramePos( Point pt ) const;
+
+SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, 
long nWidth, long nHeight, sal_uInt16 nFlags );
+
+SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel );
+SAL_DLLPRIVATE void ImplRemoveDel

[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/Library_vcl.mk vcl/source

2014-05-01 Thread Chris Sherlock
 include/vcl/outdev.hxx   |   45 
 include/vcl/window.hxx   |   49 +
 vcl/Library_vcl.mk   |2 
 vcl/source/outdev/nativecontrols.cxx |  329 ---
 vcl/source/outdev/text.cxx   |4 
 vcl/source/window/nativecontrols.cxx |  307 
 6 files changed, 357 insertions(+), 379 deletions(-)

New commits:
commit 4f45ec19fc96e4471dc3fe342e5acd910068dd12
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 19:40:57 2014 +1000

VCL: sal_True - true and sal_False - false in outdev/text.cxx

Change-Id: I51e43962784dd21da4e9b2003c3b734026706282

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 4383e5e..bb9fbc1 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -742,7 +742,7 @@ void OutputDevice::SetTextFillColor( const Color rColor )
 {
 
 Color aColor( rColor );
-bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False;
+bool bTransFill = ImplIsColorTransparent( aColor ) ? true : false;
 
 if ( !bTransFill )
 {
@@ -1330,7 +1330,7 @@ bool OutputDevice::GetTextIsRTL( const OUString rString, 
sal_Int32 nIndex, sal_
 bool bRTL = false;
 int nCharPos = -1;
 aArgs.GetNextPos( nCharPos, bRTL );
-return (nCharPos != nIndex) ? sal_True : sal_False;
+return (nCharPos != nIndex) ? true : false;
 }
 
 sal_Int32 OutputDevice::GetTextBreak( const OUString rStr, long nTextWidth,
commit 5b86e33b5fb5f8250b88bf14e579cddd98fec36a
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Mon Apr 28 22:53:28 2014 +1000

VCL: move native widget rendering functions out of OutputDevice

The following functions should be in the Window class, not in
OutputDevice:

+ IsNativeControlSupported
+ HitTestNativeControl
+ DrawNativeControl
+ GetNativeControlRegion

Additionally, moved nativecontrols.cxx to vcl/source/window/ and whilst
we are about it, it turns out that VirtualDevice isn't used by these
functions. Therefore the 'orrible check to for the type of class can be
removed and in fact as VirtualDevice doesn't use it at all then we can
just remove the function and replace it with a call to
IsNativeWidgetEnabled().

Change-Id: Idd0bfb1cba1c2902f7a6d55d258efb38b67fb827

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 9cc34e8..7051f5a 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1795,51 +1795,6 @@ private:
 ///@}
 
 
-/** @name Native Widget Rendering functions
-
-These all just call through to the private mpGraphics functions of the 
same name.
- */
-///@{
-
-public:
-
-/** Query the platform layer for control support
- */
-boolIsNativeControlSupported( ControlType nType, 
ControlPart nPart ) const;
-
-/** Query the native control to determine if it was acted upon
- */
-boolHitTestNativeControl(   ControlType nType,
-ControlPart nPart,
-const Rectangle 
rControlRegion,
-const Point aPos,
-bool rIsInside ) 
const;
-
-/** Request rendering of a particular control and/or part
- */
-boolDrawNativeControl(  ControlType nType,
-ControlPart nPart,
-const Rectangle 
rControlRegion,
-ControlState nState,
-const ImplControlValue 
aValue,
-const OUString aCaption );
-
-/** Query the native control's actual drawing region (including adornment)
- */
-boolGetNativeControlRegion( ControlType nType,
-ControlPart nPart,
-const Rectangle 
rControlRegion,
-ControlState nState,
-const 
ImplControlValue aValue,
-const OUString 
aCaption,
-Rectangle 
rNativeBoundingRegion,
-Rectangle 
rNativeContentRegion ) const;
-///@}
-
-/** @name EPS functions
- */
-///@{
-
 public:
 
 /** Added return value to see if EPS could be painted directly.
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 001dfd5..19c20d01 100644
--- a/include/vcl/window.hxx

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

2014-05-01 Thread Chris Sherlock
 include/vcl/outdev.hxx   |   45 
 include/vcl/window.hxx   |   49 -
 vcl/Library_vcl.mk   |2 
 vcl/source/outdev/nativecontrols.cxx |  329 +++
 vcl/source/window/nativecontrols.cxx |  307 
 5 files changed, 377 insertions(+), 355 deletions(-)

New commits:
commit f2e4bb4b96a7c2176a0dd1dacd9930bf9b68d895
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 20:00:56 2014 +1000

Revert VCL: move native widget rendering functions out of OutputDevice

This reverts commit 5b86e33b5fb5f8250b88bf14e579cddd98fec36a.

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 7051f5a..9cc34e8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1795,6 +1795,51 @@ private:
 ///@}
 
 
+/** @name Native Widget Rendering functions
+
+These all just call through to the private mpGraphics functions of the 
same name.
+ */
+///@{
+
+public:
+
+/** Query the platform layer for control support
+ */
+boolIsNativeControlSupported( ControlType nType, 
ControlPart nPart ) const;
+
+/** Query the native control to determine if it was acted upon
+ */
+boolHitTestNativeControl(   ControlType nType,
+ControlPart nPart,
+const Rectangle 
rControlRegion,
+const Point aPos,
+bool rIsInside ) 
const;
+
+/** Request rendering of a particular control and/or part
+ */
+boolDrawNativeControl(  ControlType nType,
+ControlPart nPart,
+const Rectangle 
rControlRegion,
+ControlState nState,
+const ImplControlValue 
aValue,
+const OUString aCaption );
+
+/** Query the native control's actual drawing region (including adornment)
+ */
+boolGetNativeControlRegion( ControlType nType,
+ControlPart nPart,
+const Rectangle 
rControlRegion,
+ControlState nState,
+const 
ImplControlValue aValue,
+const OUString 
aCaption,
+Rectangle 
rNativeBoundingRegion,
+Rectangle 
rNativeContentRegion ) const;
+///@}
+
+/** @name EPS functions
+ */
+///@{
+
 public:
 
 /** Added return value to see if EPS could be painted directly.
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 19c20d01..001dfd5 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -970,7 +970,7 @@ public:
 boolHasChildPathFocus( bool bSystemWindow = false ) const;
 boolIsActive() const;
 boolHasActiveChildFrame();
-sal_uInt16  GetGetFocusFlags() const;
+sal_uInt16  GetGetFocusFlags() const;
 voidGrabFocusToDocument();
 
 /**
@@ -1033,7 +1033,7 @@ public:
 
 Window* FindWindow( const Point rPos ) const;
 
-sal_uInt16  GetChildCount() const;
+sal_uInt16  GetChildCount() const;
 Window* GetChild( sal_uInt16 nChild ) const;
 Window* GetWindow( sal_uInt16 nType ) const;
 boolIsChild( const Window* pWindow, bool bSystemWindow = 
false ) const;
@@ -1076,51 +1076,6 @@ public:
 voidSaveBackground( const Point rPos, const Size rSize,
 const Point rDestOff, VirtualDevice 
rSaveDevice );
 
-
-/** @name Native Widget Rendering functions
-
-These all just call through to the private mpGraphics functions of the 
same name.
- */
-///@{
-
-/** Query the platform layer for control support
- */
-boolIsNativeControlSupported( ControlType nType, 
ControlPart nPart ) const;
-
-/** @name EPS functions
- */
-///@{
-
-
-/** Query the native control to determine if it was acted upon
- */
-boolHitTestNativeControl(   ControlType nType,
-ControlPart nPart,
-const Rectangle 
rControlRegion

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

2014-05-01 Thread Chris Sherlock
 vcl/source/outdev/font.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 24ec38a96fa33b75435786caaca04f9cef86c289
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 20:13:39 2014 +1000

coverity#1209003: Unchecked return value

When AcquireGraphics() is true, then it means that we got the graphics
context.

Change-Id: Id5f4a5fc4456f6ce649fdf3ee63ff6103ba65233

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index bba7c61..e9ae02e 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -292,8 +292,11 @@ SystemFontData OutputDevice::GetSysFontData(int 
nFallbacklevel) const
 SystemFontData aSysFontData;
 aSysFontData.nSize = sizeof(aSysFontData);
 
-if (!mpGraphics) AcquireGraphics();
-if (mpGraphics) aSysFontData = mpGraphics-GetSysFontData(nFallbacklevel);
+if (!mpGraphics)
+{
+if (AcquireGraphics())
+aSysFontData = mpGraphics-GetSysFontData(nFallbacklevel);
+}
 
 return aSysFontData;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-01 Thread Chris Sherlock
 vcl/source/outdev/nativecontrols.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 68bfb2a082cc8def86d9706f3328d39d585eecfb
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 22:56:17 2014 +1000

coverity#1209550 Unchecked dynamic_cast

Dynamic cast can be dangerous - if the cast fails then it returns NULL.
Coverity picked this up - it could effect
Window::IsNativeWidgetEndabled(). Hopefully I'll get rid of this when I
remove meOutDevType during work on fdo#74702.

Change-Id: Id6df1eeff716a6acd1b108b5e1e4674e819afe3d

diff --git a/vcl/source/outdev/nativecontrols.cxx 
b/vcl/source/outdev/nativecontrols.cxx
index 28e2d35..325320c 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -32,7 +32,19 @@ static bool EnableNativeWidget( const OutputDevice 
i_rDevice )
 {
 
 case OUTDEV_WINDOW:
-return dynamic_cast const Window* ( i_rDevice 
)-IsNativeWidgetEnabled();
+{
+const Window* pWindow = dynamic_cast const Window* ( i_rDevice 
);
+if (pWindow)
+{
+return pWindow-IsNativeWidgetEnabled();
+}
+else
+{
+SAL_WARN (vcl.gdi, Could not cast i_rDevice to Window);
+assert (pWindow);
+return false;
+}
+}
 
 case OUTDEV_VIRDEV:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/qa

2014-05-01 Thread Chris Sherlock
 sal/qa/osl/file/osl_File.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bd22c1ca588147dd522542fcc39ba8b3f5c3b16c
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 23:19:43 2014 +1000

coverity#1209781 Resource leak

We should free pTV_modify when we're done with it.

Change-Id: I7eaf64df2f7bdf6bd899d3a31cad499c4066c990

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 261..5e5093b 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -1860,7 +1860,7 @@ namespace osl_FileStatus
 CPPUNIT_ASSERT( nError == FileBase::E_None );
 
 //get modify time
-TimeValue *pTV_modify = NULL;
+TimeValue* pTV_modify = NULL;
 CPPUNIT_ASSERT( ( pTV_modify = ( TimeValue* )malloc( sizeof( 
TimeValue ) ) ) != NULL );
 *pTV_modify = rFileStatus.getModifyTime();
 
@@ -1868,6 +1868,7 @@ namespace osl_FileStatus
 //delete file
 deleteTestFile( aTypeURL );
 free( pTV_current );
+free( pTV_modify );
 
 CPPUNIT_ASSERT_MESSAGE( test for getModifyTime function: This 
test turns out that UNX pricision is no more than 1 sec, don't know how to 
improve this function.  ,
 bOK );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - basic/qa o3tl/qa

2014-05-01 Thread Chris Sherlock
 basic/qa/cppunit/basictest.hxx |2 ++
 o3tl/qa/test-sorted_vector.cxx |4 
 2 files changed, 6 insertions(+)

New commits:
commit f0bfee74d479f39d500d19c48380d88bdb3ad93d
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 23:49:05 2014 +1000

coverity#1209778  coverity#1209777 Resource leak

Have testBasics_FindPtr() cleanup after itself by deleting p2 and p4.

Change-Id: I88b5efd25941d135b743f759a8f27c1cdbcb43c0

diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx
index e380355..059c1ba 100644
--- a/o3tl/qa/test-sorted_vector.cxx
+++ b/o3tl/qa/test-sorted_vector.cxx
@@ -193,6 +193,8 @@ public:
 CPPUNIT_ASSERT( aVec.size() == 3 );
 
 aVec.DeleteAndDestroyAll();
+delete p2;
+delete p4;
 }
 
 void testErase_FindPtr()
commit 8bf0b9536cb33dfcce8a811b70c2ead285300f3f
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Thu May 1 23:42:49 2014 +1000

coverity#1209779  coverity#1209780 Resource leak

Have the testBasics() function clean up after itself - delete p2 and
p4 at the end of the function.

Change-Id: Ib0c732e1962da94fde0e0da307f610dd36f49eda

diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx
index 3cf5669..369f0df 100644
--- a/basic/qa/cppunit/basictest.hxx
+++ b/basic/qa/cppunit/basictest.hxx
@@ -78,6 +78,8 @@ class MacroSnippet
 sSource = sCode;
 }
 }
+
+free(buffer);
 }
 }
 CPPUNIT_ASSERT_MESSAGE( Source is empty, ( sSource.getLength()  0 ) 
);
diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx
index 5f068d9..e380355 100644
--- a/o3tl/qa/test-sorted_vector.cxx
+++ b/o3tl/qa/test-sorted_vector.cxx
@@ -68,6 +68,8 @@ public:
 CPPUNIT_ASSERT( aVec.erase(p2) == 0 );
 
 aVec.DeleteAndDestroyAll();
+delete p2;
+delete p4;
 }
 
 void testErase()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-01 Thread Chris Sherlock
 sw/source/core/crsr/crsrsh.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6b431b1f0d397067504b5300d49e10e232936836
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 2 02:01:24 2014 +1000

coverity#708922 Use after free

Change-Id: I54c098ca4744d33d2f8e1a7799ba6bd5620ed987

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index fe86bd3..c2d2639 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2511,8 +2511,9 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** 
ppDelRing )
 }
 pTmpDel = 0;
 }
-if( bGoNext )
+if( bGoNext  !bDelete )
 pTmp = (SwPaM*)pTmp-GetNext();
+
 } while( !bGoNext || *ppDelRing != pTmp );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-01 Thread Chris Sherlock
 sw/source/core/crsr/crsrsh.cxx |2 +-
 vcl/source/outdev/font.cxx |   12 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit d0b3832bedf65d466b37a69036b0b4ba550a849b
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 2 03:03:37 2014 +1000

Fix 6b431b1f0d397067504b5300d49e10e232936836

Pushed wrong branch. Oops, sorry.

Change-Id: I592cf16c7af3c5e37a03eee79e5822dcc0b39225

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index c2d2639..9958ede 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2511,7 +2511,7 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** 
ppDelRing )
 }
 pTmpDel = 0;
 }
-if( bGoNext  !bDelete )
+if( bGoNext  !pTmp )
 pTmp = (SwPaM*)pTmp-GetNext();
 
 } while( !bGoNext || *ppDelRing != pTmp );
commit e97f19e96c094457ba98e3f89195cad4d814e8a3
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 2 02:34:14 2014 +1000

coverity#441827 Deference before null check

In OutputDevice::ImplGlyphFallbackLayout we should check to ensure that
mpFontEntry is valid, if not then return NULL early.

Change-Id: I946aa4d724a73a2ff85a4281c0df5f75e12104f7

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index e9ae02e..78f8204 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -2029,6 +2029,16 @@ SalLayout* OutputDevice::getFallbackFont(ImplFontEntry 
rFallbackFont,
 
 SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, 
ImplLayoutArgs rLayoutArgs ) const
 {
+// This function relies on a valid mpFontEntry, if it doesn't exist bail 
out
+// - we'd have crashed later on anyway. At least here we can catch the 
error in debug
+// mode.
+if ( !mpFontEntry )
+{
+SAL_WARN (vcl.gdi, No font entry set in OutputDevice);
+assert(mpFontEntry);
+return NULL;
+}
+
 // prepare multi level glyph fallback
 MultiSalLayout* pMultiSalLayout = NULL;
 ImplLayoutRuns aLayoutRuns = rLayoutArgs.maRuns;
@@ -2062,7 +2072,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( 
SalLayout* pSalLayout, ImplLay
 
 aFontSelData.mpFontEntry = pFallbackFont;
 aFontSelData.mpFontData = pFallbackFont-maFontSelData.mpFontData;
-if( mpFontEntry  nFallbackLevel  MAX_FALLBACK-1)
+if( nFallbackLevel  MAX_FALLBACK-1)
 {
 // ignore fallback font if it is the same as the original font
 if( mpFontEntry-maFontSelData.mpFontData == 
aFontSelData.mpFontData )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-01 Thread Chris Sherlock
 sw/source/core/crsr/crsrsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f99f4dc93f44fa1cd799d0ad87ded7ee90d82848
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Fri May 2 03:28:02 2014 +1000

Fix d0b3832bedf65d

Turns out, my logic was wrong in any case. Remove errant not.

Change-Id: I735ee1b4364060aa1476160777e196878a5a208e

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 9958ede..62c11d0 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2511,7 +2511,7 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** 
ppDelRing )
 }
 pTmpDel = 0;
 }
-if( bGoNext  !pTmp )
+if( bGoNext  pTmp )
 pTmp = (SwPaM*)pTmp-GetNext();
 
 } while( !bGoNext || *ppDelRing != pTmp );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-03 Thread Chris Sherlock
 include/vcl/outdev.hxx|  133 ---
 vcl/source/outdev/map.cxx |   20 +
 vcl/source/outdev/outdev.cxx  |  645 --
 vcl/source/outdev/outdevstate.cxx |   27 +
 vcl/source/outdev/transparent.cxx |   52 +++
 vcl/source/outdev/wallpaper.cxx   |   19 +
 6 files changed, 470 insertions(+), 426 deletions(-)

New commits:
commit be8a6756179beeb9dedcab5fbb105ab92808a4f8
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat May 3 16:14:21 2014 +1000

Rearrange outdev.cxx functions, et al.

* Rearranged outdev.cxx functions to better match outdev.hxx layout
* Moved transparency functions from outdev.cxx to transparency.cxx
* Corrected one comment typo in outdev.hxx
* Moved CreateUnoGraphicsList definition to outdev.cxx out of header
* Formatted function declarations in outdev.hxx

Change-Id: I6fda24ae8208ef5ea7b2fe8f59079d48d0af1488

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 9cc34e8..676cf08 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -405,11 +405,7 @@ public:
 css::uno::Reference css::awt::XGraphics 
 CreateUnoGraphics();
 VCLXGraphicsList_impl*  GetUnoGraphicsList() const  { return 
mpUnoGraphicsList; }
-VCLXGraphicsList_impl*  CreateUnoGraphicsList()
-{
-mpUnoGraphicsList = new 
VCLXGraphicsList_impl();
-return mpUnoGraphicsList;
-}
+VCLXGraphicsList_impl*  CreateUnoGraphicsList();
 
 protected:
 
@@ -503,14 +499,19 @@ private:
 
 public:
 
-virtual voidDrawOutDev( const Point rDestPt, const Size 
rDestSize,
-const Point rSrcPt,  const Size 
rSrcSize );
-virtual voidDrawOutDev( const Point rDestPt, const Size 
rDestSize,
-const Point rSrcPt,  const Size 
rSrcSize,
-const OutputDevice rOutDev );
-virtual voidCopyArea( const Point rDestPt,
-  const Point rSrcPt,  const Size 
rSrcSize,
-  sal_uInt16 nFlags = 0 );
+virtual voidDrawOutDev(
+const Point rDestPt, const Size 
rDestSize,
+const Point rSrcPt,  const Size rSrcSize 
);
+
+virtual voidDrawOutDev(
+const Point rDestPt, const Size 
rDestSize,
+const Point rSrcPt,  const Size rSrcSize,
+const OutputDevice rOutDev );
+
+virtual voidCopyArea(
+const Point rDestPt,
+const Point rSrcPt,  const Size rSrcSize,
+sal_uInt16 nFlags = 0 );
 
 protected:
 
@@ -589,11 +590,16 @@ public:
 voidSetFont( const Font rNewFont );
 const Font GetFont() const { return maFont; }
 
+protected:
+
+virtual voidImplReleaseFonts();
+
 private:
 
 SAL_DLLPRIVATE void InitLineColor();
 
 SAL_DLLPRIVATE void InitFillColor();
+
 ///@}
 
 
@@ -796,14 +802,17 @@ public:
 
 voidDrawEllipse( const Rectangle rRect );
 
-voidDrawArc( const Rectangle rRect,
- const Point rStartPt, const Point 
rEndPt );
+voidDrawArc(
+const Rectangle rRect,
+const Point rStartPt, const Point rEndPt 
);
 
-voidDrawPie( const Rectangle rRect,
- const Point rStartPt, const Point 
rEndPt );
+voidDrawPie(
+const Rectangle rRect,
+const Point rStartPt, const Point rEndPt 
);
 
-voidDrawChord( const Rectangle rRect,
-   const Point rStartPt, const Point 
rEndPt );
+voidDrawChord(
+const Rectangle rRect,
+const Point rStartPt, const Point rEndPt 
);
 
 ///@}
 
@@ -1126,7 +1135,6 @@ public:
 protected:
 
 virtual voidInitFont() const;
-virtual voidImplReleaseFonts();
 virtual voidSetFontOrientation( ImplFontEntry* const 
pFontEntry ) const;
 virtual longGetFontExtLeading() const;
 
@@ -1417,17 +1425,19 @@ public:
 @attention the output metafile

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

2014-05-04 Thread Chris Sherlock
 desktop/inc/app.hxx  |1 
 desktop/source/app/app.cxx   |1 
 include/vcl/svapp.hxx|   32 +++---
 include/vcl/window.hxx   |2 -
 vcl/source/app/svapp.cxx |   52 +--
 vcl/source/outdev/map.cxx|   11 -
 vcl/source/window/window.cxx |   48 ---
 7 files changed, 71 insertions(+), 76 deletions(-)

New commits:
commit f76026a43acc65465882924796d93e635c35fd90
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sat May 3 23:23:06 2014 +1000

Move ImplInitAppFontData from Window to Application

I have renamed ImplInitAppFontData to InitAppFontData and moved it from
Window to Application. This is because this is something that sets
*application* global variables, it just so happens it gets it from a
Window parameter. But it should be set when the application starts, so
I have moved it to Main().

Change-Id: I9d98aa5b533166f91352218af267930034648c7a
Reviewed-on: https://gerrit.libreoffice.org/9242
Reviewed-by: Chris Sherlock chris.sherloc...@gmail.com
Tested-by: Chris Sherlock chris.sherloc...@gmail.com

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 67fc3fb..8b8affe 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -128,6 +128,7 @@ class Desktop : public Application
 // throws an exception upon failure
 
 private:
+
 voidRegisterServices(
 css::uno::Reference 
css::uno::XComponentContext  const  context);
 voidDeregisterServices();
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 377afc7..5f4b3bb 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1493,6 +1493,7 @@ int Desktop::Main()
the main thread is not yet in the event loop.
 */
 Application::GetDefaultDevice();
+InitAppFontData();
 
 #if HAVE_FEATURE_EXTENSIONS
 // Check if bundled or shared extensions were added /removed
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1b8f6e1..ddf5c63 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -265,6 +265,12 @@ public:
 */
 virtual voidInit();
 
+protected:
+/** Initialize font data for the application.
+ */
+virtual voidInitAppFontData();
+
+public:
 /** Finish initialization of the application.
 
  @see Init, DeInit
@@ -348,7 +354,7 @@ public:
 
  @returns true if exited successfully, false if not able to fully exit
 */
-virtual bool   QueryExit();
+virtual boolQueryExit();
 
 /** Send user event.
 
@@ -626,7 +632,7 @@ public:
 
  @see IsInExecute, IsInModalMode
 */
-static bool IsInMain();
+static bool IsInMain();
 
 /** Queries whether the application is in the event loop
 
@@ -634,7 +640,7 @@ public:
 
  @see IsInMain, IsInModalMode
 */
-static bool IsInExecute();
+static bool IsInExecute();
 
 /** Queries whether application has a modal dialog active.
 
@@ -642,7 +648,7 @@ public:
 
  @see IsInMain, IsInExecute
 */
-static bool IsInModalMode();
+static bool IsInModalMode();
 
 /** Return how many events are being dispatched.
 
@@ -679,7 +685,7 @@ public:
 
  @returns   true if UI is captured, false if not
  */
-static bool IsUICaptured();
+static bool IsUICaptured();
 
 /** @name Settings
 
@@ -836,7 +842,7 @@ public:
 
  @see PostKeyEvent
 */
-static bool HandleKey( sal_uLong nEvent, Window *pWin, 
KeyEvent* pKeyEvent );
+static bool HandleKey( sal_uLong nEvent, Window *pWin, 
KeyEvent* pKeyEvent );
 
 /** Send keypress event
 
@@ -902,7 +908,7 @@ public:
 
  @return true if there is a default window and the event could be posted 
to it successfully.
 */
-static bool PostUserEvent( sal_uLong rEventId, const Link 
rLink, void* pCaller = NULL );
+static bool PostUserEvent( sal_uLong rEventId, const 
Link rLink, void* pCaller = NULL );
 
 /** Remove user event based on event ID
 
@@ -920,7 +926,7 @@ public:
 
  @return true if the handler was inserted successfully, false if it 
couldn't be inserted.
 */
-static bool InsertIdleHdl( const Link rLink, sal_uInt16 
nPriority );
+static bool InsertIdleHdl( const Link rLink, sal_uInt16 
nPriority );
 
 /** Remove an idle handler from the application.
 
@@ -1173,7 +1179,7 @@ public:
 
  @see RemoveAccel
 */
-static bool InsertAccel( Accelerator* pAccel );
+static bool InsertAccel( Accelerator* pAccel );
 
 /** Remove accelerator
 
@@ -1197,7

WB_3DLOOK

2014-05-05 Thread Chris Sherlock
Hi all,

I have been review the Window classes in VCL and I noticed a window style 
WB_3DLOOK. It appears to set 

* the window button colour and the window text color - see 
http://opengrok.libreoffice.org/xref/core/vcl/source/window/window.cxx#1144

* face colour for split windows, docking windows and toolboxes - see 
http://opengrok.libreoffice.org/xref/core/vcl/source/window/splitwin.cxx#1343 
and 
http://opengrok.libreoffice.org/xref/core/vcl/source/window/dockwin.cxx#357 and 
also http://opengrok.libreoffice.org/xref/core/vcl/source/window/toolbox.cxx#551

I guess my question is: is this still desirable behaviour? Do we still want to 
specify a 3D or non-3D look in the window style? Almost everything sets it to 
on anyway from what I can see.

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


[Libreoffice-commits] core.git: 4 commits - desktop/inc desktop/source include/vcl vcl/source

2014-05-06 Thread Chris Sherlock
 desktop/inc/app.hxx  |1 
 desktop/source/app/app.cxx   |1 
 include/vcl/svapp.hxx|   38 ++
 include/vcl/window.hxx   |2 -
 vcl/source/app/svapp.cxx |   54 ---
 vcl/source/outdev/map.cxx|   11 
 vcl/source/window/window.cxx |   48 --
 7 files changed, 76 insertions(+), 79 deletions(-)

New commits:
commit 081a0854635f4bc9f6f743ef4e2675c208405f74
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Tue May 6 23:49:29 2014 +1000

Move ImplInitAppFontData from Window to Application (take 2)

I have renamed ImplInitAppFontData to InitAppFontData and moved it from
Window to Application. This is because this is something that sets
*application* global variables, it just so happens it gets it from a
Window parameter. But it should be set when the application starts, so I
have moved it to Main().

This was previously reverted, but I have since located what was causing
unit tests to fail and the font dropdowns to stop loading in writer:
see commit c6d7ba5f33c3 where Application::SetSettings() was setting
pImplSVData-maGDIData.mnAppFontX to zero.

Change-Id: I5da7073b0d8541f1a71a09b0a8337d012fc4134b

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 67fc3fb..8b8affe 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -128,6 +128,7 @@ class Desktop : public Application
 // throws an exception upon failure
 
 private:
+
 voidRegisterServices(
 css::uno::Reference 
css::uno::XComponentContext  const  context);
 voidDeregisterServices();
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 377afc7..247ac1d 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1493,6 +1493,7 @@ int Desktop::Main()
the main thread is not yet in the event loop.
 */
 Application::GetDefaultDevice();
+Application::InitAppFontData();
 
 #if HAVE_FEATURE_EXTENSIONS
 // Check if bundled or shared extensions were added /removed
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index a0d71e6..b7e00ca 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -267,6 +267,12 @@ public:
 */
 virtual voidInit();
 
+protected:
+/** Initialize font data for the application.
+ */
+static void InitAppFontData();
+
+public:
 /** Finish initialization of the application.
 
  @see Init, DeInit
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 5dc7340..64d4732 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -384,8 +384,6 @@ public:
 DECL_DLLPRIVATE_LINK(  ImplHideOwnerDrawWindowsHdl, void* );
 
 
-SAL_DLLPRIVATE static void  ImplInitAppFontData( Window* pWindow );
-
 SAL_DLLPRIVATE Window*  ImplGetFrameWindow() const;
 SalFrame*   ImplGetFrame() const;
 SAL_DLLPRIVATE ImplFrameData*   ImplGetFrameData();
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 607702d..ac24717 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -318,12 +318,12 @@ void Application::Abort( const OUString rErrorText )
 SalAbort( rErrorText, dumpCore );
 }
 
-sal_uLong   Application::GetReservedKeyCodeCount()
+sal_uLong Application::GetReservedKeyCodeCount()
 {
 return ImplReservedKeys::get()-second;
 }
 
-const KeyCode*  Application::GetReservedKeyCode( sal_uLong i )
+const KeyCode* Application::GetReservedKeyCode( sal_uLong i )
 {
 if( i = GetReservedKeyCodeCount() )
 return NULL;
@@ -549,7 +549,7 @@ void Application::SetSettings( const AllSettings rSettings 
)
 {
 nOldDPIX = pFirstFrame-mnDPIX;
 nOldDPIY = pFirstFrame-mnDPIY;
-Window::ImplInitAppFontData(pFirstFrame);
+InitAppFontData();
 }
 Window* pFrame = pFirstFrame;
 while ( pFrame )
@@ -1664,4 +1664,52 @@ Application::createFolderPicker( const Reference 
uno::XComponentContext  xSM
 return pSVData-mpDefInst-createFolderPicker( xSM );
 }
 
+void Application::InitAppFontData()
+{
+ImplSVData* pSVData = ImplGetSVData();
+
+Window *pWindow = pSVData-mpDefaultWin;
+
+long nTextHeight = pWindow-GetTextHeight();
+long nTextWidth = pWindow-approximate_char_width() * 8;
+long nSymHeight = nTextHeight*4;
+// Make the basis wider if the font is too narrow
+// such that the dialog looks symmetrical and does not become too narrow.
+// Add some extra space when the dialog has the same width,
+// as a little more space is better.
+if ( nSymHeight  nTextWidth )
+nTextWidth = nSymHeight;
+else if ( nSymHeight+5

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

2014-05-06 Thread Chris Sherlock
 vcl/source/app/svapp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 87f33f6f44a73e8662d718aafea427b336a88b24
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Wed May 7 09:37:42 2014 +1000

VCL: make it more clear that this is a static function we are calling on

Change-Id: Ic7ac1a1bc3ac3901c844ee6e1c59a1518043f761

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ac24717..8a7a8b4 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -549,7 +549,7 @@ void Application::SetSettings( const AllSettings rSettings 
)
 {
 nOldDPIX = pFirstFrame-mnDPIX;
 nOldDPIY = pFirstFrame-mnDPIY;
-InitAppFontData();
+Application::InitAppFontData();
 }
 Window* pFrame = pFirstFrame;
 while ( pFrame )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   5   6   7   8   9   10   >