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

2013-07-11 Thread Tor Lillqvist
 include/sfx2/shell.hxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 7450f19f62194f79349fa6d3bdb9733d7110a143
Author: Tor Lillqvist 
Date:   Thu Jul 11 15:59:18 2013 +0300

Bin pointless #ifndef _SFXSH_HXX

Change-Id: I5c08bf9a9db2d1509407589dfbecdde44577ccba

diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index ddeb677..7b8fb55 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -162,12 +162,10 @@ protected:
 SfxShell();
 SfxShell( SfxViewShell *pViewSh );
 
-#ifndef _SFXSH_HXX
 SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell* pView );
 SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 
nId );
 SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const;
 SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj );
-#endif
 
 public:
 TYPEINFO();
@@ -253,11 +251,9 @@ public:
 */
 void BroadcastContextForActivation (const bool bIsActivated);
 
-#ifndef _SFXSH_HXX
 SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot );
 SAL_DLLPRIVATE void DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI);
 SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool 
bMDI);
-#endif
 };
 
 //
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-30 Thread Tor Lillqvist
 include/sfx2/objsh.hxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 85118169a5dccc3cd6f8260515f98ba3c4c91596
Author: Tor Lillqvist 
Date:   Wed Jul 30 16:49:03 2014 +0300

ASPECT_ALL is unused

Also add comment about the three sets of names for the same constants that
must match.

Change-Id: Id626b6f1cdaa4c2a8c391ae4f020186997ccb4d9

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index aa767ff..3456fd8 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -74,11 +74,14 @@ class JobSetup;
 class Size;
 class Point;
 
+// These values presumably must match exactly the corresponding
+// css::embed::Aspects ones (in offapi/com/sun/star/embed/Aspects.idl)
+// and the DVASPECT_* ones in the Win32 API.
+
 #define ASPECT_CONTENT  1
 #define ASPECT_THUMBNAIL2 /* 120 * 120, 6 Colors DIB in MetaFile */
 #define ASPECT_ICON 4
 #define ASPECT_DOCPRINT 8
-#define ASPECT_ALL  (ASPECT_CONTENT | ASPECT_THUMBNAIL | ASPECT_ICON | 
ASPECT_DOCPRINT)
 
 // must be the same as in OLE2
 #define SVOBJ_MISCSTATUS_NOTRESIZEABLE  512
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-03 Thread Stephan Bergmann
 include/sfx2/printer.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 8583bccaac0832f3488d7fefefb80109e535b46e
Author: Stephan Bergmann 
Date:   Thu Jul 3 18:20:39 2014 +0200

Dead declarations

Change-Id: I5fe417a6f3682764f8ff1844cc418e95d68c6c38

diff --git a/include/sfx2/printer.hxx b/include/sfx2/printer.hxx
index 66dd4dc..f07a135 100644
--- a/include/sfx2/printer.hxx
+++ b/include/sfx2/printer.hxx
@@ -39,7 +39,7 @@ private:
 SfxPrinter_Impl*pImpl;
 boolbKnown;
 
-SAL_DLLPRIVATE void operator =(SfxPrinter &); // not defined
+SAL_DLLPRIVATE void operator =(SfxPrinter &) SAL_DELETED_FUNCTION;
 
 SAL_DLLPRIVATE void UpdateFonts_Impl();
 
@@ -49,9 +49,6 @@ public:
 const OUString &rPrinterName );
 SfxPrinter( SfxItemSet *pTheOptions,
 const JobSetup &rTheOrigJobSetup );
-SfxPrinter( SfxItemSet *pTheOptions,
-const OUString &rPrinterName,
-const JobSetup &rTheOrigJobSetup );
 SfxPrinter( const SfxPrinter &rPrinter );
 virtual ~SfxPrinter();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-05 Thread Tor Lillqvist
 include/sfx2/childwin.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52ee886ca0015b8997a328bfef655540f2ee49e8
Author: Tor Lillqvist 
Date:   Sun Apr 6 09:16:48 2014 +0300

WaE: implicit conversion of literal of type 'sal_Bool' to 'bool'

Change-Id: Iaaac351b2276f20a292e9b3840ddd1d808fc564f

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8e2827b..8680809 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -60,7 +60,7 @@ struct SfxChildWinInfo
 
 SfxChildWinInfo()
 {
-bVisible = sal_False;
+bVisible = false;
 nFlags = 0;
 }
 boolGetExtraData_Impl( SfxChildAlignment*pAlign,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-30 Thread Alexandre Vicenzi
 include/sfx2/app.hxx   |5 -
 include/sfx2/chalign.hxx   |2 --
 include/sfx2/docfac.hxx|7 ---
 include/sfx2/docfilt.hxx   |1 -
 include/sfx2/filedlghelper.hxx |3 ---
 include/sfx2/mieclip.hxx   |1 -
 include/sfx2/objsh.hxx |   36 
 include/sfx2/progress.hxx  |7 ++-
 8 files changed, 10 insertions(+), 52 deletions(-)

New commits:
commit c97b226b5a5480caf00d1c859fc7bcbfddde3a6a
Author: Alexandre Vicenzi 
Date:   Wed Jan 29 21:58:11 2014 -0200

fdo#63154 Removed unused solar.h ref. in sfx2

Change-Id: I7fd8815482c3491d28e0d353e725e7c37aa52fc3
Reviewed-on: https://gerrit.libreoffice.org/7736
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index d811b27..95e987b 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -98,8 +97,6 @@ namespace sfx2
 }
 }
 
-//
-
 class SfxLinkItem : public SfxPoolItem
 {
 Link aLink;
@@ -266,8 +263,6 @@ public:
 
 #define SFX_APP() SfxGetpApp()
 
-//
-
 inline SfxApplication* SfxGetpApp()
 {
 return SfxApplication::GetOrCreate();
diff --git a/include/sfx2/chalign.hxx b/include/sfx2/chalign.hxx
index c964299..bea8eca 100644
--- a/include/sfx2/chalign.hxx
+++ b/include/sfx2/chalign.hxx
@@ -19,8 +19,6 @@
 #ifndef INCLUDED_SFX2_CHALIGN_HXX
 #define INCLUDED_SFX2_CHALIGN_HXX
 
-#include 
-
 // New order: first, navigation bar, then vertically docked child windows
 // (Explorer!), then horizontally docked child windows (Browser!),
 // then the format bar, status bar, and at the end of the toolbar.
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index 512a82c..af0b7f9 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 // SFX_IMPL_MODULE_LIB
@@ -39,8 +38,6 @@ struct SfxObjectFactory_Impl;
 class SfxFilterContainer;
 class SfxBindings;
 
-//
-
 typedef void (*SfxVoidFunc)();
 
 #define SDT_SDT_DOCFACTPRIO 10  // Explorer
@@ -56,8 +53,6 @@ typedef void (*SfxVoidFunc)();
 #define SDT_MSG_DOCFACTPRIO110  // Message Document
 #define SDT_SDB_DOCFACTPRIO200  // Database Document
 
-//
-
 class SFX2_DLLPUBLIC SfxObjectFactory
 {
 private:
@@ -107,8 +102,6 @@ private:
 SAL_DLLPRIVATE const SfxObjectFactory& operator=(const SfxObjectFactory &);
 };
 
-//=
-
 #define SFX_DECL_OBJECTFACTORY()\
 public: \
 static SfxObjectFactory&Factory();  \
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index 85f93da..e746946 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #define SFX_FILTER_STARTPRESENTATION 0x2000L
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 37e48b1..a68a791 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -35,8 +34,6 @@
 #include 
 #include 
 
-//-
-
 namespace com
 {
 namespace sun
diff --git a/include/sfx2/mieclip.hxx b/include/sfx2/mieclip.hxx
index bbd8f5b..0fad211 100644
--- a/include/sfx2/mieclip.hxx
+++ b/include/sfx2/mieclip.hxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 class SvStream;
 class SotDataObject;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 69b49a6..8cf31db 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -20,10 +20,7 @@
 #define INCLUDED_SFX2_OBJSH_HXX
 
 #include 
-
 #include 
-
-#include 
 #include 
 #include 
 #include 
@@ -40,10 +37,6 @@
 #include 
 #include 
 
-//
-//  include something else
-//
-
 #include 
 #include 
 #include 
@@ -132,8 +125,6 @@ typedef sal_uInt32 SfxObjectShellFlags;
 #define SFXOBJECTSHELL_STD_SPECIAL ( SFXOBJECTSHELL_DONTLOADFILTERS )
 #define SFXOBJECTSHELL_UNDEFINED   0xf00
 
-//
-
 

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

2014-01-30 Thread Michael Stahl
 include/sfx2/sfxdefs.hxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 087e3dc82d832d56f4440d839b56e0c2cba057f2
Author: Michael Stahl 
Date:   Thu Jan 30 12:39:46 2014 +0100

sfxdefs.hxx: include the header that declares the used sal types

Change-Id: I1aeadbb0add8eae3e6b5ee46ce5524391862db57

diff --git a/include/sfx2/sfxdefs.hxx b/include/sfx2/sfxdefs.hxx
index 0e92214..2533f1f 100644
--- a/include/sfx2/sfxdefs.hxx
+++ b/include/sfx2/sfxdefs.hxx
@@ -20,7 +20,9 @@
 #ifndef INCLUDED_SFX2_SFXDEFS_HXX
 #define INCLUDED_SFX2_SFXDEFS_HXX
 
-#define SfxFilterFlags sal_uLong
+#include 
+
+typedef sal_uInt32 SfxFilterFlags;
 
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-02-05 Thread Stephan Bergmann
 include/sfx2/htmlmode.hxx |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 461550cdb5b86fd3b20e6f381acb14bcccf91406
Author: Stephan Bergmann 
Date:   Wed Feb 5 12:35:22 2014 +0100

Remove unused HTMLMODE_* defines

...and turn the remaining ones into an enum.

Change-Id: I2e650fe2640f2bf512f356c7881a9722faa6ce25

diff --git a/include/sfx2/htmlmode.hxx b/include/sfx2/htmlmode.hxx
index 952b93d..4888c48 100644
--- a/include/sfx2/htmlmode.hxx
+++ b/include/sfx2/htmlmode.hxx
@@ -19,13 +19,11 @@
 #ifndef INCLUDED_SFX2_HTMLMODE_HXX
 #define INCLUDED_SFX2_HTMLMODE_HXX
 
-#define HTMLMODE_ON 0x0001
-#define HTMLMODE_PARA_DISTANCE  0x0004
-#define HTMLMODE_SOME_STYLES0x0020 /* mind. MS IE */
-#define HTMLMODE_FULL_STYLES0x0040 /* == SW */
-#define HTMLMODE_PARA_BLOCK 0x0100
-#define HTMLMODE_RESERVED1  0x4000
-#define HTMLMODE_RESERVED0  0x8000
+enum {
+HTMLMODE_ON = 0x0001,
+HTMLMODE_SOME_STYLES = 0x0020, /* mind. MS IE */
+HTMLMODE_FULL_STYLES = 0x0040 /* == SW */
+};
 
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-04-30 Thread Tor Lillqvist
 include/sfx2/tbxctrl.hxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ade26b5c7bd2a88be5147feace1969cc01ae3ed4
Author: Tor Lillqvist 
Date:   Tue Apr 30 15:26:07 2013 +0300

MSVC: member of dll interface class may not be declared with dll interface

Change-Id: I751832d8725354cebd892738fa80fd7bc5e43925

diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index e50527f..b67ed11 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -162,7 +162,7 @@ public:
 
 #define SFX_DECL_TOOLBOX_CONTROL() \
 static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 
nId, ToolBox &rTbx ); \
-static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, 
SfxModule *pMod=NULL)
+static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule 
*pMod=NULL)
 
 /*  For special ToolBox controls, such as a font selection box or toolbox
 tear-off floating windows, an appropriate Item-Subclass of SfxTooBoxControl
@@ -360,7 +360,11 @@ module initialization has to call RegisterControl().
 class SfxRecentFilesToolBoxControl : public SfxToolBoxControl
 {
 public:
-SFX_DECL_TOOLBOX_CONTROL();
+// We don't use SFX_DECL_TOOLBOX_CONTROL() here as we need to have this
+// RegisterControl() marked as SFX2_DLLPUBLIC
+static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, 
ToolBox &rTbx );
+static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, 
SfxModule *pMod=NULL);
+
 SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& 
rBox );
 virtual ~SfxRecentFilesToolBoxControl();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-13 Thread Jan Holesovsky
 include/sfx2/recentdocsview.hxx|3 ++-
 sfx2/source/control/recentdocsview.cxx |   23 ---
 sfx2/source/control/templateview.hrc   |5 +++--
 sfx2/source/control/templateview.src   |9 +++--
 4 files changed, 28 insertions(+), 12 deletions(-)

New commits:
commit 62a0a37bad348489222b0cbe8254977c369684a1
Author: Jan Holesovsky 
Date:   Fri Dec 13 18:03:19 2013 +0100

startcenter: The welcome text was too long, split it to 2 lines.

Change-Id: I23d6a4bf8d9c3b2531dd95e4ea293ce7225bf8f1

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index ac52e67..63a067d 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -72,7 +72,8 @@ protected:
 longmnItemMaxTextLength;
 
 Image   maWelcomeImage;
-OUString maWelcomeText;
+OUString maWelcomeLine1;
+OUString maWelcomeLine2;
 };
 
 #endif // INCLUDED_SFX2_RECENTDOCSVIEW_HXX
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index afadb04..1b63ba4 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -46,7 +46,8 @@ RecentDocsView::RecentDocsView( Window* pParent )
 , mnItemPadding(5)
 , mnItemMaxTextLength(30)
 , maWelcomeImage(SfxResId(IMG_WELCOME))
-, maWelcomeText(SfxResId(STR_WELCOME))
+, maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
+, maWelcomeLine2(SfxResId(STR_WELCOME_LINE2))
 {
 SetStyle(GetStyle() | WB_VSCROLL);
 setItemMaxTextLength( mnItemMaxTextLength );
@@ -254,17 +255,25 @@ void RecentDocsView::Paint( const Rectangle &aRect )
 aNewFont.SetHeight(20);
 SetFont(aNewFont);
 
-long nTextWidth = GetTextWidth(maWelcomeText);
 long nTextHeight = GetTextHeight();
+
+long nTextWidth1 = GetTextWidth(maWelcomeLine1);
+long nTextWidth2 = GetTextWidth(maWelcomeLine2);
+
 const Size & rImgSize = maWelcomeImage.GetSizePixel();
-const Size & rScreenSize = GetSizePixel();
-const int nX = (rScreenSize.Width() - rImgSize.Width())/2;
-const int nY = (rScreenSize.Height() - nTextHeight*1.5 - 
rImgSize.Height())/2;
+
+const Size & rSize = GetSizePixel();
+
+const int nX = (rSize.Width() - rImgSize.Width())/2;
+const int nY = (rSize.Height() - 3 * nTextHeight - 
rImgSize.Height())/2;
+
 Point aImgPoint(nX, nY);
-Point aStrPoint((rScreenSize.Width() - nTextWidth)/2, nY + 
rImgSize.Height() + nTextHeight/2);
+Point aStr1Point((rSize.Width() - nTextWidth1)/2, nY + 
rImgSize.Height() + nTextHeight/2);
+Point aStr2Point((rSize.Width() - nTextWidth2)/2, nY + 
rImgSize.Height() + nTextHeight + nTextHeight/2);
 
 DrawImage(aImgPoint, rImgSize, maWelcomeImage, 
IMAGE_DRAW_SEMITRANSPARENT);
-DrawText(aStrPoint, maWelcomeText);
+DrawText(aStr1Point, maWelcomeLine1);
+DrawText(aStr2Point, maWelcomeLine2);
 
 SetFont(aOldFont);
 }
diff --git a/sfx2/source/control/templateview.hrc 
b/sfx2/source/control/templateview.hrc
index f0c4dae..e5608c9 100644
--- a/sfx2/source/control/templateview.hrc
+++ b/sfx2/source/control/templateview.hrc
@@ -10,7 +10,8 @@
 #define BTN_ALL_TEMPLATES   256
 #define CONTROL_BUTTONS 257
 #define FT_NAME 258
-#define STR_WELCOME 259
-#define IMG_WELCOME 260
+#define STR_WELCOME_LINE1   259
+#define STR_WELCOME_LINE2   260
+#define IMG_WELCOME 261
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/templateview.src 
b/sfx2/source/control/templateview.src
index 3b866bd..49fe015 100644
--- a/sfx2/source/control/templateview.src
+++ b/sfx2/source/control/templateview.src
@@ -23,9 +23,14 @@ FixedText FT_NAME
 Size = MAP_APPFONT( 238, 12 );
 };
 
-String STR_WELCOME
+String STR_WELCOME_LINE1
 {
-Text [ en-US ] = "Welcome to %PRODUCTNAME. Use the sidebar to open or 
create a file.";
+Text [ en-US ] = "Welcome to %PRODUCTNAME.";
+};
+
+String STR_WELCOME_LINE2
+{
+Text [ en-US ] = "Use the sidebar to open or create a file.";
 };
 
 Image IMG_WELCOME
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-07-10 Thread Eike Rathke
 include/sfx2/sfxhelp.hxx |2 --
 sfx2/source/appl/sfxhelp.cxx |   22 --
 2 files changed, 24 deletions(-)

New commits:
commit 3bc422573b480476bdfa775bdcf259532f4e09c6
Author: Eike Rathke 
Date:   Wed Jul 10 20:52:25 2013 +0200

removed unused language/country string member variables

Change-Id: I7659dac1a3d17b4099f310fd7b6d17455bdda2eb

diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 217f802..b92bc9d 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -31,8 +31,6 @@ class SFX2_DLLPUBLIC SfxHelp : public Help
 {
 OUStringaTicket;// for Plugins
 OUStringaUser;
-OUStringaLanguageStr;
-OUStringaCountryStr;
 sal_BoolbIsDebug;
 SfxHelp_Impl*   pImp;
 
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 2cde9ae..6d5244b 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -231,28 +231,6 @@ SfxHelp::SfxHelp() :
 }
 
 pImp = new SfxHelp_Impl();
-
-OUString aLocaleStr = HelpLocaleString();
-
-sal_Int32 nSepPos = aLocaleStr.indexOf( '_' );
-if ( nSepPos != -1 )
-{
-aLanguageStr = aLocaleStr.copy( 0, nSepPos );
-aCountryStr = aLocaleStr.copy( nSepPos+1 );
-}
-else
-{
-nSepPos = aLocaleStr.indexOf( '-' );
-if ( nSepPos != -1 )
-{
-aLanguageStr = aLocaleStr.copy( 0, nSepPos );
-aCountryStr = aLocaleStr.copy( nSepPos+1 );
-}
-else
-{
-aLanguageStr = aLocaleStr;
-}
-}
 }
 
 SfxHelp::~SfxHelp()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-07 Thread Rodolfo Ribeiro Gomes
 include/sfx2/recentdocsview.hxx|2 ++
 sfx2/source/control/recentdocsview.cxx |   27 ++-
 2 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit a29c9eff781fd6bceee5078669a53c52086b5664
Author: Rodolfo Ribeiro Gomes 
Date:   Thu Nov 7 13:59:42 2013 -0200

single-click for open recent documents in new Start Center

Change-Id: I34c6a5f9057707cdd1e2f4f82024818e7c8a6630
Signed-off-by: Rodolfo Ribeiro Gomes 
Reviewed-on: https://gerrit.libreoffice.org/6610
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 0552636..2edace5 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -58,7 +58,9 @@ public:
 DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, LoadRecentFile* );
 
 protected:
+virtual void MouseButtonDown( const MouseEvent& rMEvt );
 virtual void OnItemDblClicked(ThumbnailViewItem *pItem);
+void OpenItem( const ThumbnailViewItem *pItem );
 
 bool isAcceptedFile(const OUString &rURL) const;
 
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 5e3c796..706214e 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -175,9 +175,34 @@ void RecentDocsView::loadRecentDocs()
 Invalidate();
 }
 
+void RecentDocsView::MouseButtonDown( const MouseEvent& rMEvt )
+{
+if ( rMEvt.IsLeft() )
+{
+size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
+ThumbnailViewItem* pItem = ImplGetItem(nPos);
+
+if (pItem && pItem->isVisible())
+{
+Rectangle aRect(pItem->getDrawArea());
+if (aRect.IsInside(rMEvt.GetPosPixel()))
+{
+OnItemDblClicked(pItem);
+return;
+}
+}
+}
+ThumbnailView::MouseButtonDown( rMEvt );
+}
+
 void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *pItem)
 {
-RecentDocsViewItem* pRecentItem = dynamic_cast(pItem);
+OpenItem( pItem );
+}
+
+void RecentDocsView::OpenItem( const ThumbnailViewItem *pItem )
+{
+const RecentDocsViewItem* pRecentItem = dynamic_cast(pItem);
 
 Reference< XDispatch >xDispatch;
 Reference< XDispatchProvider >xDispatchProvider;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-18 Thread Stephan Bergmann
 include/sfx2/docfile.hxx|2 +-
 sfx2/source/doc/docfile.cxx |   17 +
 2 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit b15278891a4bce875502de1265f507ed8958
Author: Stephan Bergmann 
Date:   Mon Nov 18 12:10:46 2013 +0100

SfxMedium::LockOrigFileOnDemand return value is never used

Change-Id: I2f64cc8fbe78354f9ded7a9a6bf03d9c597b3897

diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 7ef8b9e..33450a3 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -161,7 +161,7 @@ public:
 sal_BoolIsStorage();
 
 sal_Int8ShowLockedDocumentDialog( const css::uno::Sequence< 
OUString >& aData, sal_Bool bIsLoading, sal_Bool bOwnLock );
-boolLockOrigFileOnDemand( sal_Bool bLoading, sal_Bool 
bNoUI );
+voidLockOrigFileOnDemand( sal_Bool bLoading, sal_Bool 
bNoUI );
 voidUnlockFile( sal_Bool bReleaseLockStream );
 
 css::uno::Reference< css::embed::XStorage > GetStorage( sal_Bool 
bCreateTempIfNo = sal_True );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 0a96f89..1b808ed 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -979,23 +979,17 @@ namespace
 
 #endif // HAVE_FEATURE_MULTIUSER_ENVIRONMENT
 
-// returns true if the document can be opened for editing ( even if it should 
be a copy )
-// otherwise the document should be opened readonly
+// sets SID_DOC_READONLY if the document cannot be opened for editing
 // if user cancel the loading the ERROR_ABORT is set
-bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
+void SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
 {
 #if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
 (void) bLoading;
 (void) bNoUI;
-return true;
 #else
-if (!IsLockingUsed())
-return true;
-
-if ( GetURLObject().HasError() )
-return false;
+if (!IsLockingUsed() || GetURLObject().HasError())
+return;
 
-bool bResult = false;
 try
 {
 if ( pImp->m_bLocked && bLoading && 
::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( 
INetURLObject::NO_DECODE ) ) )
@@ -1005,7 +999,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, 
sal_Bool bNoUI )
 GetLockingStream_Impl();
 }
 
-bResult = pImp->m_bLocked;
+bool bResult = pImp->m_bLocked;
 
 if ( !bResult )
 {
@@ -1224,7 +1218,6 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, 
sal_Bool bNoUI )
 {
 SAL_WARN( "sfx.doc", "Locking exception: high probability, that the 
content has not been created" );
 }
-return bResult;
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-20 Thread Caolán McNamara
 include/sfx2/dispatch.hxx|   33 -
 sfx2/source/control/dispatch.cxx |   72 ---
 2 files changed, 68 insertions(+), 37 deletions(-)

New commits:
commit 32a621027f1a234a85b3659b93752a9263d8e860
Author: Caolán McNamara 
Date:   Wed Nov 20 16:17:54 2013 +

Resolves: fdo#70703 guard against FlushImpl inside FlushImpl

where the inner one deletes Shells that the outer one is still
processing. Push the candidates onto a stack and let inner
FlushImpl modify them to inform outer FlushImpl's that an entry
has been deleted

Change-Id: I1db8546d53e24cc96c72f2cd5cbec57b6cecaff5

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index c48871a..151d483 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -76,10 +77,38 @@ public:
 }
 };
 
+struct SfxToDo_Impl
+{
+SfxShell*  pCluster;
+bool   bPush;
+bool   bDelete;
+bool   bDeleted;
+bool   bUntil;
+
+SfxToDo_Impl()
+: pCluster(0)
+, bPush(false)
+, bDelete(false)
+, bDeleted(false)
+, bUntil(false)
+{}
+SfxToDo_Impl( bool bOpPush, bool bOpDelete, bool bOpUntil, SfxShell& 
rCluster )
+: pCluster(&rCluster)
+, bPush(bOpPush)
+, bDelete(bOpDelete)
+, bDeleted(false)
+, bUntil(bOpUntil)
+{}
+
+bool operator==( const SfxToDo_Impl& rWith ) const
+{ return pCluster==rWith.pCluster && bPush==rWith.bPush; }
+};
+
 class SFX2_DLLPUBLIC SfxDispatcher
 {
-SfxDispatcher_Impl* pImp;
-sal_BoolbFlushed;
+SfxDispatcher_Impl*  pImp;
+sal_Bool bFlushed;
+std::deque< std::deque > aToDoCopyStack;
 
 private:
 // Search for temporary evaluated Todos
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 923a615..934a6cb 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -69,31 +69,6 @@ DBG_NAME(SfxDispatcherFillState)
 
 typedef std::vector SfxRequestPtrArray;
 
-struct SfxToDo_Impl
-{
-SfxShell*  pCluster;
-bool   bPush;
-bool   bDelete;
-bool   bUntil;
-
-SfxToDo_Impl()
-: pCluster(0)
-, bPush(false)
-, bDelete(false)
-, bUntil(false)
-{}
-SfxToDo_Impl( bool bOpPush, bool bOpDelete, bool bOpUntil, SfxShell& 
rCluster )
-: pCluster(&rCluster)
-, bPush(bOpPush)
-, bDelete(bOpDelete)
-, bUntil(bOpUntil)
-{}
-~SfxToDo_Impl(){}
-
-bool operator==( const SfxToDo_Impl& rWith ) const
-{ return pCluster==rWith.pCluster && bPush==rWith.bPush; }
-};
-
 struct SfxObjectBars_Impl
 {
 sal_uInt32 nResId;  // Resource - and ConfigId of the Toolbox
@@ -1627,22 +1602,49 @@ void SfxDispatcher::FlushImpl()
 bFlushed = sal_True;
 OSL_TRACE("Successfully flushed dispatcher!");
 
+//fdo#70703 FlushImpl may call back into itself so use aToDoCopyStack to 
talk
+//to outer levels of ourself. If DoActivate_Impl/DoDeactivate_Impl deletes
+//an entry, then they will walk back up aToDoCopyStack and set outer
+//levels's entries to bDeleted
+aToDoCopyStack.push_back(aToDoCopy);
+std::deque& rToDoCopy = aToDoCopyStack.back();
 // Activate the Shells and possible delete them in the 2nd round
-for(std::deque::reverse_iterator i = aToDoCopy.rbegin(); i 
!= aToDoCopy.rend(); ++i)
-{
-if(i->bPush)
-{
-if ( pImp->bActive )
-i->pCluster->DoActivate_Impl(pImp->pFrame, sal_True);
-}
-else if ( pImp->bActive )
-i->pCluster->DoDeactivate_Impl(pImp->pFrame, sal_True);
+for(std::deque::reverse_iterator i = rToDoCopy.rbegin(); i 
!= rToDoCopy.rend(); ++i)
+{
+if (i->bDeleted)
+continue;
+if (!pImp->bActive)
+continue;
+if (i->bPush)
+i->pCluster->DoActivate_Impl(pImp->pFrame, sal_True);
+else
+i->pCluster->DoDeactivate_Impl(pImp->pFrame, sal_True);
 }
 
+aToDoCopy = aToDoCopyStack.back();
+aToDoCopyStack.pop_back();
+
 for(std::deque::reverse_iterator i = aToDoCopy.rbegin(); i 
!= aToDoCopy.rend(); ++i)
 {
-if(i->bDelete)
+if (i->bDelete && !i->bDeleted)
+{
+if (!aToDoCopyStack.empty())
+{
+//fdo#70703 if there is an outer FlushImpl then inform it that
+//we have deleted this cluster
+for (std::deque< std::deque >::iterator aI = 
aToDoCopyStack.begin();
+aI != aToDoCopyStack.end(); ++aI)
+{
+std::deque &v = *aI;
+for(std::deque::iterator aJ = v.begin(); aJ 
!= v.end(); 

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

2013-06-05 Thread Julien Nabet
 include/sfx2/sidebar/ContextChangeBroadcaster.hxx |1 -
 sfx2/source/sidebar/ContextChangeBroadcaster.cxx  |5 +
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 11c00f1fdd63a4c9a011f1f2d0ca66945013f39b
Author: Julien Nabet 
Date:   Thu Jun 6 08:31:12 2013 +0200

Fix -Werror,-Wunused-private-field

Change-Id: Idcba9e9bc6210250a37950a2b927b9b74cc57c4f

diff --git a/include/sfx2/sidebar/ContextChangeBroadcaster.hxx 
b/include/sfx2/sidebar/ContextChangeBroadcaster.hxx
index 0869631..aba7404 100644
--- a/include/sfx2/sidebar/ContextChangeBroadcaster.hxx
+++ b/include/sfx2/sidebar/ContextChangeBroadcaster.hxx
@@ -42,7 +42,6 @@ public:
 
 private:
 rtl::OUString msContextName;
-bool mbIsContextActive;
 
 void BroadcastContextChange (
 const cssu::Reference& rxFrame,
diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx 
b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
index c5cd093..a66d25b 100644
--- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
+++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
@@ -31,8 +31,7 @@ namespace sfx2 { namespace sidebar {
 
 
 ContextChangeBroadcaster::ContextChangeBroadcaster (void)
-: msContextName(),
-  mbIsContextActive(false)
+: msContextName()
 {
 }
 
@@ -47,8 +46,6 @@ ContextChangeBroadcaster::~ContextChangeBroadcaster (void)
 
 void ContextChangeBroadcaster::Initialize (const ::rtl::OUString& 
rsContextName)
 {
-OSL_ASSERT( ! mbIsContextActive);
-
 msContextName = rsContextName;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-09 Thread Zolnai Tamás
 include/sfx2/thumbnailview.hxx|1 -
 sfx2/source/control/thumbnailview.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit baf112e6f085c4e13ece0028a9c40f41d8ced308
Author: Zolnai Tamás 
Date:   Thu Jan 9 19:00:11 2014 +0100

Startcenter: mnSpacing became unused

Change-Id: I01f2911c690da36ed0d5beb306e28ab438890fd9

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index bfd1ca5..3ee7a45 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -330,7 +330,6 @@ protected:
 
 sal_uInt16 mnCols;
 sal_uInt16 mnFirstLine;
-sal_uInt16 mnSpacing;
 bool mbScroll : 1;
 bool mbIsTransientChildrenDisabled : 1;
 bool mbHasVisibleItems : 1;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index b799487..5c8522e 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -150,7 +150,6 @@ void ThumbnailView::ImplInit()
 mnFineness  = 5;
 mnFirstLine = 0;
 mnCols  = 0;
-mnSpacing   = 0;
 mbScroll= false;
 mbHasVisibleItems   = false;
 mbShowTooltips  = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-15 Thread Krisztian Pinter
 include/sfx2/recentdocsview.hxx|2 --
 sfx2/source/control/recentdocsview.cxx |5 -
 2 files changed, 7 deletions(-)

New commits:
commit 90eff0d6cf268d9152ecc8a3e1c3fc62f1451d0e
Author: Krisztian Pinter 
Date:   Tue Aug 13 18:07:56 2013 +0200

startcenter: Remove unneeded GetOptimalSize from RecentDocsView

Change-Id: I350b76e3bafe64e8dee15f8863e2abd9755d1122

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 38f1a53..98f9e9a 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -45,8 +45,6 @@ public:
 void insertItem(const OUString &rURL, const OUString &rTitle);
 void loadRecentDocs();
 
-virtual Size GetOptimalSize() const;
-
 void SetThumbnailSize(long thumbnailSize);
 long GetThumbnailSize() const;
 void SetFilter(APPLICATION_FILTER filter);
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index ae235f7..0f54865 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -228,11 +228,6 @@ void RecentDocsView::SetFilter(APPLICATION_FILTER filter)
 mFilter = filter;
 }
 
-Size RecentDocsView::GetOptimalSize() const
-{
-return Window::GetOptimalSize();
-}
-
 IMPL_STATIC_LINK_NOINSTANCE( RecentDocsView, ExecuteHdl_Impl, LoadRecentFile*, 
pLoadRecentFile )
 {
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-15 Thread Krisztian Pinter
 include/sfx2/recentdocsview.hxx|2 --
 sfx2/source/control/recentdocsview.cxx |4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit aa65b0a4cbd7d7ed85a33b4d9d262a3c88ec533d
Author: Krisztian Pinter 
Date:   Wed Aug 14 15:07:56 2013 +0200

startcenter: Removed no. limit on thumbnails in RecentDocsView

Change-Id: Ia443b3c653d9355cf499e066e8085c7ddefef19e

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 98f9e9a..9cb77d3 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -65,8 +65,6 @@ protected:
 longmnTextHeight;
 longmnItemPadding;
 longmnItemMaxTextLength;
-
-int mnMaxThumbnailItems;
 };
 
 #endif  // __SFX2_RECENTDOCSVIEW_HXX__
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 0f54865..a532b14 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -45,7 +45,6 @@ RecentDocsView::RecentDocsView( Window* pParent )
 , mnTextHeight(30)
 , mnItemPadding(5)
 , mnItemMaxTextLength(30)
-, mnMaxThumbnailItems(50)
 {
 SetStyle(GetStyle() | WB_VSCROLL);
 setItemMaxTextLength( mnItemMaxTextLength );
@@ -137,8 +136,7 @@ void RecentDocsView::loadRecentDocs()
 Clear();
 
 Sequence< Sequence< PropertyValue > > aHistoryList = 
SvtHistoryOptions().GetList( ePICKLIST );
-int nRecentThumbnailItems = mnMaxThumbnailItems < aHistoryList.getLength() 
? mnMaxThumbnailItems : aHistoryList.getLength();
-for ( int i = 0; i < nRecentThumbnailItems; i++ )
+for ( int i = 0; i < aHistoryList.getLength(); i++ )
 {
 Sequence< PropertyValue >& rRecentEntry = aHistoryList[i];
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-19 Thread Krisztian Pinter
 include/sfx2/templateabstractview.hxx|1 
 sfx2/source/control/templateabstractview.cxx |   45 ---
 2 files changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 2e45813b7e5757bc050e121acfe942763b9544ff
Author: Krisztian Pinter 
Date:   Sun Aug 11 19:35:15 2013 +0200

Refactor TemplateAbstractView to define file exts. in one place

Change-Id: I5d799f51c41d9b4f5a0161cf49e76d9539826d8f
Reviewed-on: https://gerrit.libreoffice.org/5365
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/include/sfx2/templateabstractview.hxx 
b/include/sfx2/templateabstractview.hxx
index d101aff..8dd6027 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -53,6 +53,7 @@ public:
 
 virtual bool operator () (const ThumbnailViewItem *pItem);
 
+static bool isFilteredExtension(FILTER_APPLICATION filter, const OUString 
&rExt);
 bool isValid (const OUString& rPath) const;
 
 protected:
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index cd6e77f..d911917 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -27,32 +27,36 @@
 #include "../doc/doc.hrc"
 #include "templateview.hrc"
 
-bool ViewFilter_Application::isValid (const OUString &rPath) const
+bool ViewFilter_Application::isFilteredExtension(FILTER_APPLICATION filter, 
const OUString &rExt)
 {
 bool bRet = true;
 
-INetURLObject aUrl(rPath);
-OUString aExt = aUrl.getExtension();
-if (mApp == FILTER_APP_WRITER)
+if (filter == FILTER_APP_WRITER)
 {
-bRet = aExt == "ott" || aExt == "stw" || aExt == "oth" || aExt == 
"dot" || aExt == "dotx";
+bRet = rExt == "ott" || rExt == "stw" || rExt == "oth" || rExt == 
"dot" || rExt == "dotx";
 }
-else if (mApp == FILTER_APP_CALC)
+else if (filter == FILTER_APP_CALC)
 {
-bRet = aExt == "ots" || aExt == "stc" || aExt == "xlt" || aExt == 
"xltm" || aExt == "xltx";
+bRet = rExt == "ots" || rExt == "stc" || rExt == "xlt" || rExt == 
"xltm" || rExt == "xltx";
 }
-else if (mApp == FILTER_APP_IMPRESS)
+else if (filter == FILTER_APP_IMPRESS)
 {
-bRet = aExt == "otp" || aExt == "sti" || aExt == "pot" || aExt == 
"potm" || aExt == "potx";
+bRet = rExt == "otp" || rExt == "sti" || rExt == "pot" || rExt == 
"potm" || rExt == "potx";
 }
-else if (mApp == FILTER_APP_DRAW)
+else if (filter == FILTER_APP_DRAW)
 {
-bRet = aExt == "otg" || aExt == "std";
+bRet = rExt == "otg" || rExt == "std";
 }
 
 return bRet;
 }
 
+bool ViewFilter_Application::isValid (const OUString &rPath) const
+{
+INetURLObject aUrl(rPath);
+return isFilteredExtension(mApp, aUrl.getExtension());
+}
+
 bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem)
 {
 const TemplateViewItem *pTempItem = dynamic_cast(pItem);
@@ -260,26 +264,19 @@ BitmapEx TemplateAbstractView::scaleImg (const BitmapEx 
&rImg, long width, long
 
 BitmapEx TemplateAbstractView::getDefaultThumbnail( const OUString& rPath )
 {
+BitmapEx aImg;
 INetURLObject aUrl(rPath);
 OUString aExt = aUrl.getExtension();
 
-BitmapEx aImg;
-if ( aExt == "ott" || aExt == "stw" || aExt == "oth" || aExt == "dot" || 
aExt == "dotx" )
-{
+if ( ViewFilter_Application::isFilteredExtension( FILTER_APP_WRITER, aExt) 
)
 aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_TEXT ) );
-}
-else if ( aExt == "ots" || aExt == "stc" || aExt == "xlt" || aExt == 
"xltm" || aExt == "xltx" )
-{
+else if ( ViewFilter_Application::isFilteredExtension( FILTER_APP_CALC, 
aExt) )
 aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_SHEET ) );
-}
-else if ( aExt == "otp" || aExt == "sti" || aExt == "pot" || aExt == 
"potm" || aExt == "potx" )
-{
+else if ( ViewFilter_Application::isFilteredExtension( FILTER_APP_IMPRESS, 
aExt) )
 aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_PRESENTATION ) );
-}
-else if ( aExt == "otg" || aExt == "std" )
-{
+else if ( ViewFilter_Application::isFilteredExtension( FILTER_APP_DRAW, 
aExt) )
 aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_DRAWING ) );
-}
+
 return aImg;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-09-03 Thread Krisztian Pinter
 include/sfx2/thumbnailview.hxx|5 +
 sfx2/source/control/thumbnailview.cxx |   32 +++-
 sfx2/source/dialog/backingwindow.cxx  |2 ++
 3 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 48d00430e2b1ceb16a0c377c4aa6c40b733eb529
Author: Krisztian Pinter 
Date:   Mon Sep 2 15:46:23 2013 +0200

startcenter: Add tooltips for thumbnails with long filenames

Change-Id: Id9bab881f74b40691cb3e7364af78758d769a8a6
Reviewed-on: https://gerrit.libreoffice.org/5756
Reviewed-by: Krisztian Pinter 
Tested-by: Krisztian Pinter 

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 823e6ad..30037a6 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -186,6 +186,8 @@ public:
 
 virtual ~ThumbnailView ();
 
+virtual voidMouseMove( const MouseEvent& rMEvt );
+
 void AppendItem (ThumbnailViewItem *pItem);
 
 void RemoveItem( sal_uInt16 nItemId );
@@ -230,6 +232,8 @@ public:
 
 OUString GetItemText( sal_uInt16 nItemId ) const;
 
+void ShowTooltips( bool bShowTooltips );
+
 void SetColor( const Color& rColor );
 
 void SetColor() { SetColor( Color( COL_TRANSPARENT ) ); }
@@ -328,6 +332,7 @@ protected:
 bool mbScroll : 1;
 bool mbIsTransientChildrenDisabled : 1;
 bool mbHasVisibleItems : 1;
+bool mbShowTooltips : 1;
 Color maColor;
 
 Link maItemStateHdl;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index b80086b..18d14a1 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -83,6 +83,30 @@ ThumbnailView::~ThumbnailView()
 ImplDeleteItems();
 }
 
+void ThumbnailView::MouseMove( const MouseEvent& rMEvt )
+{
+if ( !mbShowTooltips )
+return;
+
+(void) rMEvt; // unused parameter
+ThumbnailViewItem *pItem;
+size_t  nItemCount = mFilteredItemList.size();
+boolbFound = false;
+Point   aPoint = GetPointerState().maPos;
+
+for ( size_t i = 0; i < nItemCount && !bFound; i++ )
+{
+pItem = mFilteredItemList[i];
+if ( pItem->mbVisible && pItem->getDrawArea().IsInside(aPoint) )
+bFound = true;
+}
+
+if ( bFound )
+SetQuickHelpText(pItem->maTitle);
+else
+SetQuickHelpText("");
+}
+
 void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
 {
 if (maFilterFunc(pItem))
@@ -110,7 +134,7 @@ void ThumbnailView::ImplInit()
 mnHeaderHeight  = 0;
 mnItemWidth = 0;
 mnItemHeight= 0;
-mnItemPadding = 0;
+mnItemPadding   = 0;
 mnVisLines  = 0;
 mnLines = 0;
 mnFirstLine = 0;
@@ -119,6 +143,7 @@ void ThumbnailView::ImplInit()
 mnSpacing   = 0;
 mbScroll= false;
 mbHasVisibleItems   = false;
+mbShowTooltips  = false;
 maFilterFunc = ViewFilterAll();
 maColor = GetSettings().GetStyleSettings().GetFieldColor();
 mpStartSelRange = mFilteredItemList.end();
@@ -1210,6 +1235,11 @@ OUString ThumbnailView::GetItemText( sal_uInt16 nItemId 
) const
 return OUString();
 }
 
+void ThumbnailView::ShowTooltips( bool bShowTooltips )
+{
+mbShowTooltips = bShowTooltips;
+}
+
 void ThumbnailView::SetColor( const Color& rColor )
 {
 maColor = rColor;
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 40d04d7..e951291 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -255,6 +255,7 @@ void BackingWindow::initControls()
 // of setupModuleTab. TYPE_OTHER is always added.
 mpAllRecentThumbnails->mnFileTypes |= TYPE_OTHER;
 mpAllRecentThumbnails->loadRecentDocs();
+mpAllRecentThumbnails->ShowTooltips( true );
 
 setupButton( mpWriterButton );
 setupButton( mpDrawButton );
@@ -304,6 +305,7 @@ void BackingWindow::setupModuleTab(const OString& rTabName, 
RecentDocsView* pRec
 mpAllRecentThumbnails-> mnFileTypes |= nFileTypes;
 pRecView->mnFileTypes |= nFileTypes;
 pRecView->loadRecentDocs();
+pRecView->ShowTooltips( true );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-09-18 Thread Caolán McNamara
 include/sfx2/recentdocsview.hxx   |2 +-
 include/sfx2/recentdocsviewitem.hxx   |3 ++-
 include/sfx2/templatecontaineritem.hxx|2 +-
 include/sfx2/templateviewitem.hxx |2 +-
 include/sfx2/thumbnailviewitem.hxx|2 +-
 sfx2/source/control/recentdocsview.cxx|6 +++---
 sfx2/source/control/recentdocsviewitem.cxx|5 +++--
 sfx2/source/control/templateabstractview.cxx  |6 ++
 sfx2/source/control/templatecontaineritem.cxx |4 ++--
 sfx2/source/control/templatelocalview.cxx |   12 
 sfx2/source/control/templatesearchview.cxx|3 +--
 sfx2/source/control/templateviewitem.cxx  |4 ++--
 sfx2/source/control/thumbnailviewitem.cxx |4 ++--
 sfx2/source/inc/templatesearchviewitem.hxx|4 ++--
 14 files changed, 27 insertions(+), 32 deletions(-)

New commits:
commit e90982f5962968a0f334d232b3be54fcdb736e1d
Author: Caolán McNamara 
Date:   Wed Sep 18 12:44:08 2013 +0100

Resolves: fdo#69444 cursor keys don't move between recent used docs

because each item is identified by an id, but that isn't set on the recent 
used
so it stays stuck on the first one.

change the ctor of the base element to require an id to be passed to it and
adjust all the good code and then use the index+1 of the recently used 
elements
as the id.

Change-Id: I1e5978ddedbd4718923ef72d67598158d5ba8ee7

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index ebb915c..1c3949e 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -44,7 +44,7 @@ public:
 RecentDocsView( Window* pParent );
 virtual ~RecentDocsView();
 
-void insertItem(const OUString &rURL, const OUString &rTitle);
+void insertItem(const OUString &rURL, const OUString &rTitle, sal_uInt16 
nId);
 void loadRecentDocs();
 
 void SetThumbnailSize(long thumbnailSize);
diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
index 05ae15ae..33d3bb9 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -15,7 +15,8 @@
 class RecentDocsViewItem : public ThumbnailViewItem
 {
 public:
-RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL, const 
OUString &rTitle);
+RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
+const OUString &rTitle, sal_uInt16 nId);
 virtual void setEditTitle (bool edit, bool bChangeFocus = true);
 
 OUString maURL;
diff --git a/include/sfx2/templatecontaineritem.hxx 
b/include/sfx2/templatecontaineritem.hxx
index 8f23c28..9d69ddf 100644
--- a/include/sfx2/templatecontaineritem.hxx
+++ b/include/sfx2/templatecontaineritem.hxx
@@ -23,7 +23,7 @@ public:
 BitmapEx maPreview4;
 std::vector maTemplates;
 
-TemplateContainerItem (ThumbnailView &rView);
+TemplateContainerItem (ThumbnailView &rView, sal_uInt16 nId);
 
 virtual ~TemplateContainerItem ();
 
diff --git a/include/sfx2/templateviewitem.hxx 
b/include/sfx2/templateviewitem.hxx
index 6e3442b..92d5919 100644
--- a/include/sfx2/templateviewitem.hxx
+++ b/include/sfx2/templateviewitem.hxx
@@ -16,7 +16,7 @@ class TemplateViewItem : public ThumbnailViewItem
 {
 public:
 
-TemplateViewItem (ThumbnailView &rView);
+TemplateViewItem (ThumbnailView &rView, sal_uInt16 nId);
 
 virtual ~TemplateViewItem ();
 
diff --git a/include/sfx2/thumbnailviewitem.hxx 
b/include/sfx2/thumbnailviewitem.hxx
index 2272bc5..ea7bf93 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -73,7 +73,7 @@ public:
 OUString maTitle;
 ::com::sun::star::uno::Reference< 
::com::sun::star::accessibility::XAccessible >* mpxAcc;
 
-ThumbnailViewItem (ThumbnailView &rView);
+ThumbnailViewItem (ThumbnailView &rView, sal_uInt16 nId);
 
 virtual ~ThumbnailViewItem ();
 
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 1099911..5e3c796 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -136,9 +136,9 @@ BitmapEx RecentDocsView::getDefaultThumbnail(const OUString 
&rURL)
 return aImg;
 }
 
-void RecentDocsView::insertItem(const OUString &rURL, const OUString &rTitle)
+void RecentDocsView::insertItem(const OUString &rURL, const OUString &rTitle, 
sal_uInt16 nId)
 {
-RecentDocsViewItem *pChild = new RecentDocsViewItem(*this, rURL, rTitle);
+RecentDocsViewItem *pChild = new RecentDocsViewItem(*this, rURL, rTitle, 
nId);
 
 AppendItem(pChild);
 }
@@ -167,7 +167,7 @@ void RecentDocsView::loadRecentDocs()
 
 if( isAcceptedFile(aURL) )
 {
-insertItem(aURL, aTitle);
+insertItem(aURL, aTitle, i+1);
 }
 }
 
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index a4024ae..3817d0d 100644
--- a/sfx2/sour

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

2013-09-19 Thread Krisztian Pinter
 include/sfx2/templateabstractview.hxx|2 +
 include/sfx2/thumbnailview.hxx   |3 +
 sfx2/source/control/templateabstractview.cxx |   22 +
 sfx2/source/control/thumbnailview.cxx|   43 ++-
 4 files changed, 50 insertions(+), 20 deletions(-)

New commits:
commit 806919adf9c9bafbaba92c2d2ab35d2e2f9863f8
Author: Krisztian Pinter 
Date:   Sun Sep 15 19:37:06 2013 +0200

Make scrolling in ThumbnailView smoother and not per-line

Change-Id: I3df50dc953c6a5123b62f129b6e303ff682c6d9b
Reviewed-on: https://gerrit.libreoffice.org/5951
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/templateabstractview.hxx 
b/include/sfx2/templateabstractview.hxx
index 8648205..962e754 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -131,6 +131,8 @@ protected:
 
 virtual void OnItemDblClicked(ThumbnailViewItem *pItem);
 
+virtual void Paint( const Rectangle& rRect );
+
 protected:
 
 sal_uInt16 mnCurRegionId;
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 30037a6..bfb08bc 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -325,6 +325,9 @@ protected:
 long mnDisplayHeight;   // Height of the data display box (name, etc)
 long mnVisLines;
 long mnLines;
+
+int mnFineness;
+
 sal_uInt16 mnHighItemId;
 sal_uInt16 mnCols;
 sal_uInt16 mnFirstLine;
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index 32f1372..5de8a8e 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -17,6 +17,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -27,6 +31,9 @@
 #include "../doc/doc.hrc"
 #include "templateview.hrc"
 
+using namespace basegfx;
+using namespace drawinglayer::primitive2d;
+
 bool ViewFilter_Application::isFilteredExtension(FILTER_APPLICATION filter, 
const OUString &rExt)
 {
 bool bRet = true;
@@ -321,4 +328,19 @@ void TemplateAbstractView::OnItemDblClicked 
(ThumbnailViewItem *pItem)
 }
 }
 
+void TemplateAbstractView::Paint( const Rectangle& rRect )
+{
+ThumbnailView::Paint( rRect );
+
+Rectangle aRect(rRect.TopLeft(),
+Point(rRect.BottomRight().X(), mnHeaderHeight));
+
+drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
+aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
+new 
PolyPolygonColorPrimitive2D(B2DPolyPolygon(Polygon(aRect).getB2DPolygon()),
+BColor(1.0, 1.0, 1.0)));
+
+mpProcessor->process(aSeq);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 7976c6a..ab78488 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -136,6 +136,7 @@ void ThumbnailView::ImplInit()
 mnItemPadding   = 0;
 mnVisLines  = 0;
 mnLines = 0;
+mnFineness  = 5;
 mnFirstLine = 0;
 mnHighItemId= 0;
 mnCols  = 0;
@@ -287,6 +288,14 @@ void ThumbnailView::CalculateItemPositions ()
 }
 }
 
+// calculate window scroll ratio
+float nScrollRatio;
+if( mpScrBar )
+nScrollRatio = static_cast(mpScrBar->GetThumbPos()) /
+static_cast(mpScrBar->GetRangeMax()-2);
+else
+nScrollRatio = 0;
+
 // calculate ScrollBar width
 long nScrBarWidth = 0;
 if ( mpScrBar )
@@ -316,25 +325,29 @@ void ThumbnailView::CalculateItemPositions ()
 
 if ( mnLines <= mnVisLines )
 mnFirstLine = 0;
-else
-{
-if ( mnFirstLine > (sal_uInt16)(mnLines-mnVisLines) )
-mnFirstLine = (sal_uInt16)(mnLines-mnVisLines);
-}
+else if ( mnFirstLine > (sal_uInt16)(mnLines-mnVisLines) )
+mnFirstLine = (sal_uInt16)(mnLines-mnVisLines);
 
 mbHasVisibleItems = true;
 
+long nItemHeightOffset = mnItemHeight + nVItemSpace;
+long nHiddenLines = (static_cast(
+( mnLines - 1 ) * nItemHeightOffset * nScrollRatio ) -
+nVItemSpace - mnHeaderHeight) /
+nItemHeightOffset;
+
 // calculate offsets
 long nStartX = nHItemSpace;
 long nStartY = nVItemSpace + mnHeaderHeight;
 
 // calculate and draw items
 long x = nStartX;
-long y = nStartY;
+long y = nStartY - ( mnLines - 1 ) * nItemHeightOffset * nScrollRatio +
+nHiddenLines * nItemHeightOffset;
 
 // draw items
-size_t nFirstItem = mnFirstLine * mnCols;
-size_t nLastItem = nFirstItem + (mnVisLines * mnCols);
+size_t nFirstItem = nHiddenLines * mnCols;
+size_t nLastItem = nFirstItem + (mnVisLines + 1) * mnCols;
 
 maItemListRect.Left() = x;
 maItemListRect.Top() = y;
@@ -413,9 +426,8 @@ void Thum

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

2013-09-21 Thread Michael Stahl
 include/sfx2/app.hxx   |6 ++
 include/sfx2/sidebar/Theme.hxx |6 +++---
 sfx2/source/appl/app.cxx   |   11 +++
 sfx2/source/appl/appdata.cxx   |1 +
 sfx2/source/inc/appdata.hxx|6 +-
 sfx2/source/sidebar/Theme.cxx  |   19 ---
 6 files changed, 30 insertions(+), 19 deletions(-)

New commits:
commit ca0169340c94adc791061e3fb098fa656f22a8c5
Author: Michael Stahl 
Date:   Sat Sep 21 18:01:36 2013 +0200

sfx2: fix sfx2::sidebar::Theme lifecycle

It's a horrible idea to have global VCL Images, since that will
inevitably crash on shutdown when the static dtor runs after
DeInitVCL, which breaks ~every JunitTest now.

0x2af6750d2d51 in rtl::Reference::~Reference 
(this=0x2af6756ceb28 , __in_chrg=)

Try to fix that by moving the global sidebar::Theme instance to
SfxApplication where it can hopefully be deleted before shutdown.

Change-Id: Ia78f1e458699335b53a741b6463ce48af69584a7

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index f8361f2..d24b40a 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -94,6 +94,9 @@ typedef ::std::vector< SfxMedium* > SfxMediumList;
 namespace sfx2
 {
 class SvLinkSource;
+namespace sidebar {
+class Theme;
+}
 }
 
 //
@@ -260,6 +263,9 @@ public:
 
 /** loads the application logo as used in the impress slideshow pause 
screen */
 static BitmapEx GetApplicationLogo(long nWidth);
+
+/** this Theme contains Images so must be deleted before DeInitVCL */
+sfx2::sidebar::Theme & GetSidebarTheme();
 };
 
 #define SFX_APP() SfxGetpApp()
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index ae1e6a6..098b63d 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -154,6 +154,8 @@ public:
 
 static void HandleDataChange (void);
 
+void InitializeTheme();
+
 Theme (void);
 virtual ~Theme (void);
 
@@ -208,8 +210,7 @@ public:
 throw(cssu::RuntimeException);
 
 private:
-static ::rtl::Reference mpInstance;
-static Theme& GetCurrentTheme (void);
+static Theme& GetCurrentTheme();
 
 ::std::vector maImages;
 ::std::vector maColors;
@@ -246,7 +247,6 @@ private:
 };
 
 void SetupPropertyMaps (void);
-void InitializeTheme (void);
 void UpdateTheme (void);
 static PropertyType GetPropertyType (const ThemeItem eItem);
 static cssu::Type GetCppuType (const PropertyType eType);
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index c668842..fb84391 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -88,6 +88,7 @@
 #include 
 #include "imestatuswindow.hxx"
 #include "workwin.hxx"
+#include 
 #include 
 #include 
 #include "sfx2/stbitem.hxx"
@@ -636,4 +637,14 @@ ErrCode SfxApplication::CallBasic( const OUString& rCode, 
BasicManager* pMgr, Sb
 #endif
 }
 
+sfx2::sidebar::Theme & SfxApplication::GetSidebarTheme()
+{
+if (!pAppData_Impl->m_pSidebarTheme.is())
+{
+pAppData_Impl->m_pSidebarTheme.set(new sfx2::sidebar::Theme);
+pAppData_Impl->m_pSidebarTheme->InitializeTheme();
+}
+return *pAppData_Impl->m_pSidebarTheme;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index a2c79ca..d031fbc 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "referers.hxx"
 #include "app.hrc"
 #include "sfx2/sfxresid.hxx"
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 00bf7b4..cdd6680 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -62,7 +62,10 @@ class BasicManager;
 class SfxBasicManagerHolder;
 class SfxBasicManagerCreationListener;
 
-namespace sfx2 { namespace appl { class ImeStatusWindow; } }
+namespace sfx2 {
+namespace appl { class ImeStatusWindow; }
+namespace sidebar { class Theme; }
+}
 
 typedef Link* LinkPtr;
 
@@ -130,6 +133,7 @@ public:
 SfxSlotPool*pSlotPool;
 SfxDispatcher*  pAppDispat; // Dispatcher if no document
 SfxInterface**  pInterfaces;
+::rtl::Reference m_pSidebarTheme;
 
 sal_uInt16  nDocNo; // current Doc-Number 
(AutoName)
 sal_uInt16  nInterfaces;
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index d6d95d7..bd191bb 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -20,6 +20,7 @@
 #include "Paint.hxx"
 #include "SidebarResource.hxx"
 #include "sfx2/sidebar/Tools.hxx"
+#include 
 
 #include 
 #include 
@@ -31,25 +32,13 @@ using namespace cssu;
 
 namespace sfx2 { namespace sidebar {
 
-::rtl::Reference Theme::mpInstance;
 
-
-
-
-Theme& Theme::GetCurrentThe

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

2013-10-07 Thread Krisztian Pinter
 include/sfx2/templatelocalview.hxx|2 ++
 sfx2/source/control/templatelocalview.cxx |   16 
 sfx2/source/dialog/backingwindow.cxx  |   16 
 3 files changed, 30 insertions(+), 4 deletions(-)

New commits:
commit eacbdd0e974ff8229b18d1a8434a6ca08cfe8b34
Author: Krisztian Pinter 
Date:   Wed Sep 11 17:34:09 2013 +0200

startcenter: Hide template toggle button if no templates

Change-Id: I9c6f2058e67990156a4be928449c6ebe6614e486
Reviewed-on: https://gerrit.libreoffice.org/5913
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/templatelocalview.hxx 
b/include/sfx2/templatelocalview.hxx
index 139fa70..02cc26a3 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -37,6 +37,8 @@ public:
 // Fill view with template folders thumbnails
 virtual void Populate ();
 
+bool HasUnfilteredItems(FILTER_APPLICATION App);
+
 virtual void reload ();
 
 virtual void showRootRegion ();
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index a6933a3..4d85a20 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -59,6 +59,22 @@ TemplateLocalView::~TemplateLocalView()
 delete mpDocTemplates;
 }
 
+bool TemplateLocalView::HasUnfilteredItems(FILTER_APPLICATION App)
+{
+ViewFilter_Application aFilter(App);
+bool bFound = false;
+for (size_t i = 0; !bFound && i < maRegions.size(); ++i)
+{
+TemplateContainerItem *pFolderItem = maRegions[i];
+
+for (size_t j = 0; !bFound && j < pFolderItem->maTemplates.size(); ++j)
+{
+bFound = aFilter.isValid(pFolderItem->maTemplates[j].aPath);
+}
+}
+return bFound;
+}
+
 void TemplateLocalView::Populate ()
 {
 for (size_t i = 0; i < maRegions.size(); ++i)
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 4bff268..4b6d749 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -369,11 +369,19 @@ void BackingWindow::setupTemplateView( TemplateLocalView* 
pView, FILTER_APPLICAT
 pView->showRootRegion();
 pView->setOpenTemplateHdl( LINK( this, BackingWindow, OpenTemplateHdl ) );
 
-// setup buttons
-pRecentButton->SetClickHdl( LINK( this, BackingWindow, 
RecentTemplateToggleHdl ) );
-pTemplateButton->SetClickHdl( LINK( this, BackingWindow, 
RecentTemplateToggleHdl ) );
+if( pView->HasUnfilteredItems(eFilter) )
+{
+// setup buttons
+pRecentButton->SetClickHdl( LINK( this, BackingWindow, 
RecentTemplateToggleHdl ) );
+pTemplateButton->SetClickHdl( LINK( this, BackingWindow, 
RecentTemplateToggleHdl ) );
 
-pRecentButton->Hide();  // hidden by default
+pRecentButton->Hide();  // hidden by default
+}
+else // no templates, hide toggle button
+{
+pTemplateButton->Hide();
+pRecentButton->Hide();
+}
 }
 void BackingWindow::Paint( const Rectangle& )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-10-22 Thread Stephan Bergmann
 include/sfx2/objsh.hxx  |3 +--
 sfx2/source/doc/objmisc.cxx |1 -
 sfx2/source/doc/objstor.cxx |1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ab1b996afac5dcaa222598dd29628b52a5e1903d
Author: Stephan Bergmann 
Date:   Tue Oct 22 13:51:26 2013 +0200

Remove unused SfxObjectShell::bIsTmp

Change-Id: I14b495067e25e9a80c08b08ff2034b7bfe1e6759

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index ee2ff12..e2f2c6e 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -196,9 +196,8 @@ private:
   // storage that contains the object
 SfxStyleSheetBasePool*  pStyleSheetPool;// StyleSheets
 SfxObjectCreateMode eCreateMode;  // Purpose of the object
-sal_BoolbHasName :1,  // sal_True  := existing 
object,
+sal_BoolbHasName :1;  // sal_True  := existing 
object,
   // sal_False := new object
-bIsTmp :1;// temporary Storage
 sal_BoolbIsInGenerateThumbnail; //optimize thumbnail 
generate and store procedure to improve odt saving performance, i120030
 
 private:
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4cc674e..7b13438 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -977,7 +977,6 @@ void SfxObjectShell::SetNamedVisibility_Impl()
 void SfxObjectShell::SetNoName()
 {
 bHasName = 0;
-bIsTmp = sal_True;
 GetModel()->attachResource( OUString(), GetModel()->getArgs() );
 }
 
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 165c680..67da658 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -511,7 +511,6 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
 pMedium = pMed;
 if ( !pMedium )
 {
-bIsTmp = sal_True;
 pMedium = new SfxMedium;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-14 Thread Maxim Monastirsky
 include/sfx2/recentdocsview.hxx|2 ++
 include/sfx2/recentdocsviewitem.hxx|2 +-
 include/sfx2/thumbnailviewitem.hxx |2 +-
 sfx2/source/control/recentdocsview.cxx |   16 
 sfx2/source/control/recentdocsviewitem.cxx |2 +-
 5 files changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 4a902e0c59b0dd01e6459c226268bdee4f15489a
Author: Maxim Monastirsky 
Date:   Wed May 14 16:06:42 2014 +0300

Revert "startcenter: react on mouse down instead"

This reverts commit 1a2a961c1e7cdef648c28e211433e8de6e8a831b.

As suggested by Kendy, opening with a single click
by mouse up is more natural. We need to find a better
solution for the bug mentioned in the above commit.

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 0ebf30e..c1ba062 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -63,6 +63,8 @@ public:
 protected:
 virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 
+virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+
 virtual void OnItemDblClicked(ThumbnailViewItem *pItem) SAL_OVERRIDE;
 
 virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
index 71b6474..b1a51fe 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -33,7 +33,7 @@ public:
 virtual void Paint(drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs) SAL_OVERRIDE;
 
-virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
+virtual void MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
 
 /// Called when the user clicks a document - it will open it.
 void OpenDocument();
diff --git a/include/sfx2/thumbnailviewitem.hxx 
b/include/sfx2/thumbnailviewitem.hxx
index cf3e860..ee4fd7f 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -129,7 +129,7 @@ public:
 static drawinglayer::primitive2d::PolygonHairlinePrimitive2D*
 createBorderLine (const basegfx::B2DPolygon &rPolygon);
 
-virtual void MouseButtonDown(const MouseEvent&) {}
+virtual void MouseButtonUp(const MouseEvent&) {}
 
 protected:
 
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index b4be9c8..0564e8b 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -213,19 +213,27 @@ void RecentDocsView::MouseButtonDown( const MouseEvent& 
rMEvt )
 {
 if (rMEvt.IsLeft())
 {
-if (rMEvt.GetClicks() > 1)
-return;
+// ignore to avoid stuff done in ThumbnailView; we don't do selections 
etc.
+return;
+}
+
+ThumbnailView::MouseButtonDown(rMEvt);
+}
 
+void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
+{
+if (rMEvt.IsLeft())
+{
 size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
 ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
 if (pItem)
 {
-pItem->MouseButtonDown(rMEvt);
+pItem->MouseButtonUp(rMEvt);
 return;
 }
 }
-ThumbnailView::MouseButtonDown(rMEvt);
+ThumbnailView::MouseButtonUp(rMEvt);
 }
 
 void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *)
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index 0dfef15..aa2a7e0 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -182,7 +182,7 @@ void 
RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
 }
 }
 
-void RecentDocsViewItem::MouseButtonDown(const MouseEvent& rMEvt)
+void RecentDocsViewItem::MouseButtonUp(const MouseEvent& rMEvt)
 {
 if (rMEvt.IsLeft())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-14 Thread Maxim Monastirsky
 include/sfx2/recentdocsview.hxx|3 +++
 sfx2/source/control/recentdocsview.cxx |   10 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit f22d651487382c64d0e6ce5ce3720eaccaf1150f
Author: Maxim Monastirsky 
Date:   Wed May 14 22:28:40 2014 +0300

startcenter: another attempt to fix mouse up issues

see commits
1a2a961c1e7cdef648c28e211433e8de6e8a831b
4a902e0c59b0dd01e6459c226268bdee4f15489a

Change-Id: I94b90dfc5db779317d4dda1171aeceeac6373548

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index c1ba062..00e339b 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -40,6 +40,9 @@ enum ApplicationType
 
 class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView
 {
+private:
+size_t mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
+
 public:
 RecentDocsView( Window* pParent );
 virtual ~RecentDocsView();
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 0564e8b..0f797f6 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -213,6 +213,8 @@ void RecentDocsView::MouseButtonDown( const MouseEvent& 
rMEvt )
 {
 if (rMEvt.IsLeft())
 {
+mnLastMouseDownItem = ImplGetItem(rMEvt.GetPosPixel());
+
 // ignore to avoid stuff done in ThumbnailView; we don't do selections 
etc.
 return;
 }
@@ -227,11 +229,13 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& 
rMEvt)
 size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
 ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
-if (pItem)
-{
+if (pItem && nPos == mnLastMouseDownItem)
 pItem->MouseButtonUp(rMEvt);
+
+mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
+
+if (pItem)
 return;
-}
 }
 ThumbnailView::MouseButtonUp(rMEvt);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-14 Thread Maxim Monastirsky
 include/sfx2/recentdocsview.hxx|4 +---
 sfx2/source/control/recentdocsview.cxx |1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ed1d0f0c45b616bf67a571d8f09e30673e0be77e
Author: Maxim Monastirsky 
Date:   Wed May 14 22:46:33 2014 +0300

fix build

Change-Id: I40b7f9388388e05ab5b034ac81861aa34a23d2a8

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 00e339b..453eb3f 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -40,9 +40,6 @@ enum ApplicationType
 
 class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView
 {
-private:
-size_t mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
-
 public:
 RecentDocsView( Window* pParent );
 virtual ~RecentDocsView();
@@ -80,6 +77,7 @@ protected:
 longmnTextHeight;
 longmnItemPadding;
 longmnItemMaxTextLength;
+size_t mnLastMouseDownItem;
 
 /// Image that appears when there is no recent document.
 Image maWelcomeImage;
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 0f797f6..80bbde8 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -47,6 +47,7 @@ RecentDocsView::RecentDocsView( Window* pParent )
 , maWelcomeImage(SfxResId(IMG_WELCOME))
 , maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
 , maWelcomeLine2(SfxResId(STR_WELCOME_LINE2))
+, mnLastMouseDownItem(THUMBNAILVIEW_ITEM_NOTFOUND)
 {
 Rectangle aScreen = 
Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
 mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 
256 : 192;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-19 Thread Stephan Bergmann
 include/sfx2/sfxbasecontroller.hxx |2 +-
 sfx2/source/view/sfxbasecontroller.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d09124d94270e9d15e3cd0a86ec90e5e2a1822eb
Author: Stephan Bergmann 
Date:   Mon May 19 22:52:42 2014 +0200

Fix overriding exception specification

Change-Id: I6eb46f1ffccc1d98b1a1485486cbc355ce296cd3

diff --git a/include/sfx2/sfxbasecontroller.hxx 
b/include/sfx2/sfxbasecontroller.hxx
index 5389d8f..a81568f 100644
--- a/include/sfx2/sfxbasecontroller.hxx
+++ b/include/sfx2/sfxbasecontroller.hxx
@@ -169,7 +169,7 @@ public:
 virtual void SAL_CALL removeTitleChangeListener( const 
css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 // css::lang::XInitialization
-virtual void SAL_CALL initialize( const ::css::uno::Sequence< 
::css::uno::Any >& aArguments ) SAL_OVERRIDE;
+virtual void SAL_CALL initialize( const ::css::uno::Sequence< 
::css::uno::Any >& aArguments ) throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
 
 // FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
 // either the _Impl name should vanish or there should be an "official" API
diff --git a/sfx2/source/view/sfxbasecontroller.cxx 
b/sfx2/source/view/sfxbasecontroller.cxx
index cc4930a..98ad17d 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1524,7 +1524,7 @@ void SAL_CALL 
SfxBaseController::removeTitleChangeListener(const Reference< fram
 xBroadcaster->removeTitleChangeListener (xListener);
 }
 
-void SfxBaseController::initialize( const ::css::uno::Sequence< 
::css::uno::Any >& /*aArguments*/ )
+void SfxBaseController::initialize( const ::css::uno::Sequence< 
::css::uno::Any >& /*aArguments*/ ) throw (css::uno::RuntimeException, 
std::exception)
 {
 if (m_pData->m_pViewShell)
 m_pData->m_pViewShell->Initialize();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-28 Thread Caolán McNamara
 include/sfx2/mgetempl.hxx   |1 +
 sfx2/source/dialog/mgetempl.cxx |   14 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit aa8b268935b07c9bf95a596ee84c76eed4c03634
Author: Caolán McNamara 
Date:   Wed May 28 10:34:32 2014 +0100

Resolves: fdo#79142 When Creating Styles - The 2nd One Always Replaces the 
1st

regression from 0c17ccc493d0c7a80f37600dae76a09a119bef78

I think it might actually make more sense for SetName to always Reindex
and have another SetNameNoReindex for selective use where its known
safe to get away with it

Change-Id: I6bf7e1f45130f741954ab525b838f3ac5ff61a89

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 6082fbe..085da93 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -54,6 +54,7 @@ class SfxManageStyleSheetPage : public SfxTabPage
 
 SfxStyleSheetBase *pStyle;
 SfxStyleFamilies *pFamilies;
+SfxStyleSheetBasePool *pPool;
 const SfxStyleFamilyItem *pItem;
 OUString aBuf;
 bool bModified;
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 733abce..07e7b1d 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -45,6 +45,7 @@
 SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const 
SfxItemSet& rAttrSet)
 : SfxTabPage(pParent, "ManageStylePage", "sfx/ui/managestylepage.ui", 
rAttrSet)
 , pStyle(&((SfxStyleDialog*)GetParentDialog())->GetStyleSheet())
+, pPool(NULL)
 , pItem(0)
 , bModified(false)
 , aName(pStyle->GetName())
@@ -78,7 +79,6 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* 
pParent, const SfxItemS
 OSL_ENSURE( pResMgr, "No ResMgr in Module" );
 pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
 
-SfxStyleSheetBasePool* pPool = 0;
 SfxObjectShell* pDocShell = SfxObjectShell::Current();
 
 if ( pDocShell )
@@ -105,6 +105,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* 
pParent, const SfxItemS
 aNoName += OUString::number( nNo );
 }
 pStyle->SetName( aNoName );
+pPool->Reindex();
 aName = aNoName;
 aFollow = pStyle->GetFollow();
 aParent = pStyle->GetParent();
@@ -419,7 +420,11 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& 
/*rAttrSet*/ )
 OUString sCmp( pStyle->GetName() );
 
 if ( sCmp != aName )
-pStyle->SetName( aName );
+{
+pStyle->SetName(aName);
+if (pPool)
+pPool->Reindex();
+}
 m_pNameRw->SetText( aName );
 m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
 
@@ -542,7 +547,8 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* 
pItemSet )
 if ( m_pNameRw->HasFocus() )
 LoseFocusHdl( m_pNameRw );
 
-if 
(!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' ')))
+bool bOk = 
pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' '));
+if (!bOk)
 {
 InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDNAME ) );
 aBox.Execute();
@@ -550,6 +556,8 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* 
pItemSet )
 m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) 
);
 return SfxTabPage::KEEP_PAGE;
 }
+else if (pPool)
+pPool->Reindex();
 bModified = true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-29 Thread Caolán McNamara
 include/sfx2/templdlg.hxx|1 -
 sfx2/source/inc/templdgi.hxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit fa551c422426962194b6bff4234f12eb5bdf57ca
Author: Caolán McNamara 
Date:   Thu May 29 11:16:47 2014 +0100

remove unused virtual method, slim this down initially

Change-Id: Ie4a912cc3c144c47a4bb59551ebb1c68f302569e

diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index cc7344c..bc6cdc7 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -36,7 +36,6 @@ class ISfxTemplateCommon
 {
 public:
 virtual SfxStyleFamily GetActualFamily() const = 0;
-virtual OUString GetSelectedEntry() const = 0;
 
 protected:
 ~ISfxTemplateCommon() {}
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index d313a6b..e49214b 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -147,7 +147,6 @@ private:
 ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : 
pDialog( pDialogP ) {}
 virtual ~ISfxTemplateCommon_Impl() {}
 virtual SfxStyleFamily GetActualFamily() const SAL_OVERRIDE { return 
pDialog->GetActualFamily(); }
-virtual OUString GetSelectedEntry() const SAL_OVERRIDE { return 
pDialog->GetSelectedEntry(); }
 };
 
 ISfxTemplateCommon_Impl aISfxTemplateCommon;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-04 Thread Laurent Balland-Poirier
 include/sfx2/passwd.hxx   |1 +
 include/sfx2/sfx.hrc  |1 +
 sfx2/source/appl/sfx.src  |5 +
 sfx2/source/dialog/passwd.cxx |   12 +---
 4 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit a4440671a9de18ebf944ed09c432a98908d79f5e
Author: Laurent Balland-Poirier 
Date:   Tue Jun 3 19:11:54 2014 +0200

fdo#79597 Password UI: correct typo for 1 character

Display a different string in case of 1 character for minimum length

Change-Id: Iba2fbbb7d4101718def7c79ce5354debf5d97041
Reviewed-on: https://gerrit.libreoffice.org/9631
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 789e444..ed96e33 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -61,6 +61,7 @@ private:
 OKButton*   mpOKBtn;
 
 OUStringmaMinLenPwdStr;
+OUStringmaMinLenPwdStr1;
 OUStringmaEmptyPwdStr;
 OUStringmaMainPwdStr;
 sal_uInt16  mnMinLen;
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 4c52994..0497f52 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -155,6 +155,7 @@
 #define STR_PASSWD_MIN_LEN  (RID_SFX_START+124)
 #define STR_NONCHECKEDOUT_DOCUMENT  (RID_SFX_START+125)
 #define BT_CHECKOUT (RID_SFX_START+126)
+#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+127)
 #define STR_ACCTITLE_PRODUCTIVITYTOOLS  (RID_SFX_START+157)
 
 #define SFX_THUMBNAIL_TEXT  (RID_SFX_START+158)
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index 08e6f1f..16f3044 100644
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.src
@@ -29,6 +29,11 @@ String STR_PASSWD_MIN_LEN
 Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
 };
 
+String STR_PASSWD_MIN_LEN1
+{
+Text [ en-US ] = "(Minimum 1 character)" ;
+};
+
 String STR_PASSWD_EMPTY
 {
 Text [ en-US ] = "(The password can be empty)" ;
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index c1d47d5..d55700f 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -86,6 +86,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
 SfxPasswordDialog::SfxPasswordDialog(Window* pParent, const OUString* 
pGroupText)
 : ModalDialog(pParent, "PasswordDialog", "sfx/ui/password.ui")
 , maMinLenPwdStr(SFX2_RESSTR(STR_PASSWD_MIN_LEN))
+, maMinLenPwdStr1(SFX2_RESSTR(STR_PASSWD_MIN_LEN1))
 , maEmptyPwdStr(SFX2_RESSTR(STR_PASSWD_EMPTY))
 , mnMinLen(5)
 , mnExtras(0)
@@ -133,9 +134,14 @@ void SfxPasswordDialog::SetPasswdText( )
 mpMinLengthFT->SetText(maEmptyPwdStr);
 else
 {
-maMainPwdStr = maMinLenPwdStr;
-maMainPwdStr = maMainPwdStr.replaceAll( "$(MINLEN)", 
OUString::number((sal_Int32) mnMinLen ) );
-mpMinLengthFT->SetText(maMainPwdStr);
+if( mnMinLen == 1 )
+mpMinLengthFT->SetText(maMinLenPwdStr1);
+else
+{
+maMainPwdStr = maMinLenPwdStr;
+maMainPwdStr = maMainPwdStr.replaceAll( "$(MINLEN)", 
OUString::number((sal_Int32) mnMinLen ) );
+mpMinLengthFT->SetText(maMainPwdStr);
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-01 Thread Jan Holesovsky
 include/sfx2/recentdocsview.hxx|3 +++
 sfx2/source/control/recentdocsview.cxx |   25 +
 2 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 2568a0bb72c404366ba1665f7ce005c4d3d36ec6
Author: Jan Holesovsky 
Date:   Fri Aug 1 15:13:34 2014 +0200

hidpi, startcenter: Don't set fixed font heigt in the startcenter.

Change-Id: I68efbd08d21b514ab1659cd6bddfc2c4788c4a74

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 5563559..c728067 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -73,6 +73,9 @@ protected:
 
 bool isAcceptedFile(const OUString &rURL) const;
 
+/// Set (larger) font for the Welcome message.
+void SetMessageFont();
+
 longmnItemMaxSize;
 longmnTextHeight;
 longmnItemPadding;
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 2ac8549..af1469c 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -117,6 +117,13 @@ bool RecentDocsView::isAcceptedFile(const OUString &rURL) 
const
(mnFileTypes & TYPE_OTHER&& typeMatchesExtension(TYPE_OTHER,   
aExt));
 }
 
+void RecentDocsView::SetMessageFont()
+{
+Font aFont(GetFont());
+aFont.SetHeight(aFont.GetHeight()*1.3);
+SetFont(aFont);
+}
+
 BitmapEx RecentDocsView::getDefaultThumbnail(const OUString &rURL)
 {
 BitmapEx aImg;
@@ -195,13 +202,11 @@ void RecentDocsView::Reload()
 Invalidate();
 
 // Set preferred width
-if( mFilteredItemList.empty() )
+if (mFilteredItemList.empty())
 {
 Font aOldFont(GetFont());
-Font aNewFont(aOldFont);
-aNewFont.SetHeight(20);
-SetFont(aNewFont);
-
set_width_request(std::max(GetTextWidth(maWelcomeLine1),GetTextWidth(maWelcomeLine2)));
+SetMessageFont();
+set_width_request(std::max(GetTextWidth(maWelcomeLine1), 
GetTextWidth(maWelcomeLine2)));
 SetFont(aOldFont);
 }
 else
@@ -257,9 +262,7 @@ void RecentDocsView::Paint( const Rectangle &aRect )
 {
 // No recent files to be shown yet. Show a welcome screen.
 Font aOldFont(GetFont());
-Font aNewFont(aOldFont);
-aNewFont.SetHeight(20);
-SetFont(aNewFont);
+SetMessageFont();
 
 long nTextHeight = GetTextHeight();
 
@@ -297,10 +300,8 @@ void RecentDocsView::LoseFocus()
 void RecentDocsView::Clear()
 {
 Font aOldFont(GetFont());
-Font aNewFont(aOldFont);
-aNewFont.SetHeight(20);
-SetFont(aNewFont);
-
set_width_request(std::max(GetTextWidth(maWelcomeLine1),GetTextWidth(maWelcomeLine2)));
+SetMessageFont();
+set_width_request(std::max(GetTextWidth(maWelcomeLine1), 
GetTextWidth(maWelcomeLine2)));
 SetFont(aOldFont);
 
 ThumbnailView::Clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-26 Thread Takeshi Abe
 include/sfx2/bindings.hxx|   21 --
 sfx2/source/control/bindings.cxx |   57 ---
 2 files changed, 31 insertions(+), 47 deletions(-)

New commits:
commit b75b473e2ce6120d58023ee740b41cda35299d00
Author: Takeshi Abe 
Date:   Fri Sep 26 11:59:04 2014 +0900

fdo#75757: remove inheritance to std::vector

from SfxFoundCacheArr_Impl, by typedef'ing it as
boost::ptr_vector.

Change-Id: Id0e50370b440fb53dbb56dabca9743b27a08b90d
Reviewed-on: https://gerrit.libreoffice.org/11650
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index b1f1f0a..0bccd70 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 //  some other includes
@@ -50,8 +51,6 @@ class SfxDispatcher;
 class SfxBindings;
 class SfxBindings_Impl;
 class Timer;
-struct SfxFoundCache_Impl;
-class SfxFoundCacheArr_Impl;
 class SfxWorkWindow;
 class SfxUnoControllerItem;
 
@@ -74,6 +73,22 @@ enum SfxPopupAction
 SFX_POPUP_SHOW
 };
 
+struct SfxFoundCache_Impl
+{
+sal_uInt16  nSlotId;   // the Slot-Id
+sal_uInt16  nWhichId;  // If available: Which-Id, else: nSlotId
+const SfxSlot*  pSlot; // Pointer to 
+SfxStateCache*  pCache;// Pointer to StatusCache, if possible NULL
+
+SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, 
SfxStateCache *pC ):
+nSlotId(nS),
+nWhichId(nW),
+pSlot(pS),
+pCache(pC)
+{}
+};
+
+typedef boost::ptr_vector SfxFoundCacheArr_Impl;
 
 class SFX2_DLLPUBLIC SfxBindings: public SfxBroadcaster
 
@@ -117,7 +132,7 @@ private:
 SAL_DLLPRIVATE void Update_Impl( SfxStateCache* pCache );
 SAL_DLLPRIVATE void UpdateControllers_Impl(
 const SfxInterface* pIF,
-const SfxFoundCache_Impl* pFound,
+const SfxFoundCache_Impl& rFound,
 const SfxPoolItem *pItem,
 SfxItemState eItemState );
 SAL_DLLPRIVATE SfxStateCache* GetStateCache( sal_uInt16 nId, sal_uInt16 
*pPos);
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 4184c34..ea6a329 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -146,37 +146,6 @@ public:
 InvalidateSlotMap   m_aInvalidateSlots; // store slots which are 
invalidated while in update
 };
 
-
-
-struct SfxFoundCache_Impl
-{
-sal_uInt16  nSlotId;   // the Slot-Id
-sal_uInt16  nWhichId;  // If available: Which-Id, else: nSlotId
-const SfxSlot*  pSlot; // Pointer to 
-SfxStateCache*  pCache;// Pointer to StatusCache, if possible NULL
-
-SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, 
SfxStateCache *pC ):
-nSlotId(nS),
-nWhichId(nW),
-pSlot(pS),
-pCache(pC)
-{}
-};
-
-
-
-class SfxFoundCacheArr_Impl : public std::vector
-{
-public:
-~SfxFoundCacheArr_Impl()
-{
-for(const_iterator it = begin(); it != end(); ++it)
-delete *it;
-}
-};
-
-
-
 SfxBindings::SfxBindings()
 :   pImp(new SfxBindings_Impl),
 pDispatcher(0),
@@ -378,8 +347,8 @@ void SfxBindings::Update_Impl
 rDispat.GetShell(pMsgServer->GetShellLevel())->GetInterface();
 for ( sal_uInt16 nPos = 0; nPos < aFound.size(); ++nPos )
 {
-const SfxFoundCache_Impl *pFound = aFound[nPos];
-sal_uInt16 nWhich = pFound->nWhichId;
+const SfxFoundCache_Impl& rFound = aFound[nPos];
+sal_uInt16 nWhich = rFound.nWhichId;
 const SfxPoolItem *pItem = 0;
 SfxItemState eState = pSet->GetItemState(nWhich, true, &pItem);
 if ( eState == SfxItemState::DEFAULT && 
SfxItemPool::IsWhich(nWhich) )
@@ -400,7 +369,7 @@ void SfxBindings::Update_Impl
 SfxFoundCache_Impl aFoundCache(
 pCache->GetId(), 0,
 pRealSlot, pCache );
-UpdateControllers_Impl( 0, &aFoundCache, 0, SfxItemState::DISABLED);
+UpdateControllers_Impl( 0, aFoundCache, 0, SfxItemState::DISABLED);
 }
 }
 
@@ -1390,12 +1359,12 @@ SfxItemSet* SfxBindings::CreateSet_Impl
 sal_uInt16 i = 0;
 while ( i < rFound.size() )
 {
-pRanges[j++] = rFound[i]->nWhichId;
+pRanges[j++] = rFound[i].nWhichId;
 // consecutive numbers
 for ( ; i < rFound.size()-1; ++i )
-if ( rFound[i]->nWhichId+1 != rFound[i+1]->nWhichId )
+if ( rFound[i].nWhichId+1 != rFound[i+1].nWhichId )
 break;
-pRanges[j++] = rFound[i++]->nWhichId;
+pRanges[j++] = rFound[i++].nWhichId;
 }
 pRanges[j] = 0; // terminating NULL
 SfxItemSet *pSet = new SfxItemS

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

2014-07-03 Thread Stephan Bergmann
 include/sfx2/viewsh.hxx   |4 ++--
 sw/source/uibase/misc/glshell.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6f92b58987f754de31c9ca756e813deb7462d98e
Author: Stephan Bergmann 
Date:   Thu Jul 3 23:16:15 2014 +0200

error: reference cannot be bound to dereferenced null pointer

Change-Id: Ica39bcce389fc5d03a3902d9f703a0efa284ec92

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 7c43c93..5cde831 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -104,7 +104,7 @@ private: \
 public: \
 static SfxViewShell  *CreateInstance(SfxViewFrame *pFrame, SfxViewShell 
*pOldView); \
 static void   RegisterFactory( sal_uInt16 nPrio = USHRT_MAX ); \
-static SfxViewFactory&Factory() { return *pFactory; } \
+static SfxViewFactory*Factory() { return pFactory; } \
 static void   InitFactory()
 
 #define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
@@ -119,7 +119,7 @@ public: \
 void Class::InitFactory()
 
 #define SFX_VIEW_REGISTRATION(DocClass) \
-DocClass::Factory().RegisterViewFactory( Factory() )
+DocClass::Factory().RegisterViewFactory( *Factory() )
 
 class SfxInPlaceClient;
 typedef ::std::vector< SfxInPlaceClient* > SfxInPlaceClientList;
diff --git a/sw/source/uibase/misc/glshell.cxx 
b/sw/source/uibase/misc/glshell.cxx
index 48d33c0..45b7220 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -207,7 +207,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& 
rGroup, const OUString
 if( pGroup && pGroup->GetCount() )
 {
 // query which view is registered. In WebWriter there is no normal view
-sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6;
+sal_uInt16 nViewId = 0 != SwView::Factory() ? 2 : 6;
 const OUString sLongName = pGroup->GetLongName(pGroup->GetIndex( 
rShortName ));
 
 if( 6 == nViewId )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-15 Thread Andrzej Hunt
 include/sfx2/thumbnailview.hxx|2 +-
 sfx2/source/control/thumbnailview.cxx |   15 +++
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 717aa1ac75ddd54fdf72cd4de6551f1fb536da9b
Author: Andrzej Hunt 
Date:   Tue Apr 15 16:22:53 2014 +0100

fdo#72287 Scroll automatically to show selected item when keyboard used.

806919adf9c9bafbaba92c2d2ab35d2e2f9863f8 added finer-grained scrolling using
the scrollbar / scrollwheel, but inadvertently prevents the display from 
scrolling
when an item is selected that is currently offscreen (e.g. by using the 
down-arrow
button on the keyboard).

Change-Id: Iaa3a7dc6d214741d37cf4ec78c00ed0034ed1e42

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index afe29c7..068c01e 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -282,7 +282,7 @@ protected:
 using Control::ImplInitSettings;
 using Window::ImplInit;
 
-void CalculateItemPositions ();
+void CalculateItemPositions (bool bScrollBarUsed = false);
 void MakeItemVisible( sal_uInt16 nId );
 
 SFX2_DLLPRIVATE void ImplInit();
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 742a66f..3326334 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -270,7 +270,7 @@ void ThumbnailView::OnItemDblClicked (ThumbnailViewItem*)
 return new ThumbnailViewAcc( this, mbIsTransientChildrenDisabled );
 }
 
-void ThumbnailView::CalculateItemPositions ()
+void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
 {
 if (!mnItemHeight || !mnItemWidth)
 return;
@@ -295,7 +295,7 @@ void ThumbnailView::CalculateItemPositions ()
 
 // calculate window scroll ratio
 float nScrollRatio;
-if( mpScrBar )
+if( bScrollBarUsed && mpScrBar )
 nScrollRatio = static_cast(mpScrBar->GetThumbPos()) /
 static_cast(mpScrBar->GetRangeMax()-2);
 else
@@ -351,7 +351,12 @@ void ThumbnailView::CalculateItemPositions ()
 nHiddenLines * nItemHeightOffset;
 
 // draw items
-size_t nFirstItem = nHiddenLines * mnCols;
+// Unless we are scrolling (via scrollbar) we just use the precalculated
+// mnFirstLine -- our nHiddenLines calculation takes into account only
+// what the user has done with the scrollbar but not any changes of 
selection
+// using the keyboard, meaning we could accidentally hide the selected item
+// if we believe the scrollbar (fdo#72287).
+size_t nFirstItem = (bScrollBarUsed ? nHiddenLines : mnFirstLine) * mnCols;
 size_t nLastItem = nFirstItem + (mnVisLines + 1) * mnCols;
 
 maItemListRect.Left() = x;
@@ -433,6 +438,8 @@ void ThumbnailView::CalculateItemPositions ()
 mpScrBar->SetPosSizePixel( aPos, aSize );
 mpScrBar->SetRangeMax( (nCurCount+mnCols-1)*mnFineness/mnCols);
 mpScrBar->SetVisibleSize( mnVisLines );
+if (!bScrollBarUsed)
+mpScrBar->SetThumbPos( (long)mnFirstLine*mnFineness );
 long nPageSize = mnVisLines;
 if ( nPageSize < 1 )
 nPageSize = 1;
@@ -515,7 +522,7 @@ IMPL_LINK( ThumbnailView,ImplScrollHdl, ScrollBar*, 
pScrollBar )
 {
 if ( pScrollBar->GetDelta() )
 {
-CalculateItemPositions();
+CalculateItemPositions(true);
 
 if ( IsReallyVisible() && IsUpdateMode() )
 Invalidate();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-05 Thread Andrzej Hunt
 include/sfx2/thumbnailview.hxx|1 -
 sfx2/source/control/thumbnailview.cxx |   14 +++---
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit fb0ca7eff0e16fa8dd1a4c8d75fef23830903a3f
Author: Andrzej Hunt 
Date:   Mon May 5 20:48:58 2014 +0100

fdo#76261 Get rid of unneeded and malfunctioning maItemListRect.

maItemListRect serves as a sort of bounding box for what items /could/
be visible on screen, however it is only used for determining the id
of an item we have just clicked on -- given that we already know that
we are clicking inside the visible area this is an unnecessary check.

In fact this check is erronous as we no longer limit ourselves to "whole"
rows as of 806919adf9c9bafbaba92c2d2ab35d2e2f9863f8 -- i.e. the previous
assumption was that a view large enough for n rows will show precisely
n (whole) rows, whereas we might be showing (n-1) complete rows, and a
fraction of a row at the top and bottom of the screen, i.e. a total of
n+1 rows, where maItemRect only encloses the top n rows, meaning we
were erronously ignoring clicks on the (partly visible) lowest n+1 row.

Change-Id: Ia52ed2e0d217a9f077cef86ee9c1847252844995

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index b760426..31faaf7 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -309,7 +309,6 @@ protected:
 ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered 
items
 ThumbnailValueItemList::iterator mpStartSelRange;
 ScrollBar* mpScrBar;
-Rectangle maItemListRect;
 long mnHeaderHeight;
 long mnItemWidth;
 long mnItemHeight;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 884084d..a392075 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -350,11 +350,6 @@ void ThumbnailView::CalculateItemPositions (bool 
bScrollBarUsed)
 size_t nFirstItem = (bScrollBarUsed ? nHiddenLines : mnFirstLine) * mnCols;
 size_t nLastItem = nFirstItem + (mnVisLines + 1) * mnCols;
 
-maItemListRect.Left() = x;
-maItemListRect.Top() = y;
-maItemListRect.Right() = x + mnCols*(mnItemWidth+nHItemSpace) - 
nHItemSpace - 1;
-maItemListRect.Bottom() = y + mnVisLines*(mnItemHeight+nVItemSpace) - 
nVItemSpace - 1;
-
 // If want also draw parts of items in the last line,
 // then we add one more line if parts of these line are
 // visible
@@ -449,13 +444,10 @@ size_t ThumbnailView::ImplGetItem( const Point& rPos ) 
const
 return THUMBNAILVIEW_ITEM_NOTFOUND;
 }
 
-if ( maItemListRect.IsInside( rPos ) )
+for (size_t i = 0; i < mFilteredItemList.size(); ++i)
 {
-for (size_t i = 0; i < mFilteredItemList.size(); ++i)
-{
-if (mFilteredItemList[i]->isVisible() && 
mFilteredItemList[i]->getDrawArea().IsInside(rPos))
-return i;
-}
+if (mFilteredItemList[i]->isVisible() && 
mFilteredItemList[i]->getDrawArea().IsInside(rPos))
+return i;
 }
 
 return THUMBNAILVIEW_ITEM_NOTFOUND;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 include/svx

2014-08-26 Thread Tor Lillqvist
 include/sfx2/sfxcommands.h |   20 
 include/svx/svxcommands.h  |8 
 2 files changed, 28 deletions(-)

New commits:
commit 088b22cdf4f02834343b705cb64ab28a47a4b55e
Author: Tor Lillqvist 
Date:   Tue Aug 26 19:06:55 2014 +0300

Remove some unused macros

Change-Id: Ic8395cc31845e510b6ef5fb2a1d5f66534295012

diff --git a/include/sfx2/sfxcommands.h b/include/sfx2/sfxcommands.h
index 63a4dc2..cde5f46 100644
--- a/include/sfx2/sfxcommands.h
+++ b/include/sfx2/sfxcommands.h
@@ -19,8 +19,6 @@
 #ifndef INCLUDED_SFX2_SFXCOMMANDS_H
 #define INCLUDED_SFX2_SFXCOMMANDS_H
 
-#define CMD_SID_ABOUT   ".uno:About"
-#define CMD_SID_NEWDOC  ".uno:NewDoc"
 #define CMD_SID_BROWSE_BACKWARD ".uno:BrowseBackward"
 #define CMD_SID_BROWSE_FORWARD  ".uno:BrowseForward"
 #define CMD_SID_CLOSEWIN".uno:CloseWin"
@@ -33,25 +31,12 @@
 #define CMD_SID_STYLE_EDIT  ".uno:EditStyle"
 #define CMD_SID_WIN_FULLSCREEN  ".uno:FullScreen"
 #define CMD_SID_BASICIDE_HIDECURPAGE".uno:HideCurPage"
-#define CMD_SID_HYPERLINK_DIALOG".uno:HyperlinkDialog"
 #define CMD_SID_BASICIDE_MODULEDLG  ".uno:ModuleDialog"
 #define CMD_SID_NAVIGATOR   ".uno:Navigator"
 #define CMD_SID_BASICIDE_NEWDIALOG  ".uno:NewDialog"
 #define CMD_SID_BASICIDE_NEWMODULE  ".uno:NewModule"
-#define CMD_SID_OBJECT  ".uno:ObjectMenue"
 #define CMD_SID_OPENDOC ".uno:Open"
-#define CMD_SID_WEBHTML ".uno:WebHtml"
 #define CMD_SID_GALLERY_BG_BRUSH".uno:BackgroundImage"
-#define CMD_SID_OPENHYPERLINK   ".uno:OpenHyperlink"
-#define CMD_SID_DOCINFO_TITLE   ".uno:DocInfoTitle"
-#define CMD_SID_OPENTEMPLATE".uno:OpenTemplate"
-#define CMD_SID_CHECKOUT".uno:CheckOut"
-#define CMD_SID_CANCELCHECKOUT  ".uno:CancelCheckOut"
-#define CMD_SID_CHECKIN ".uno:CheckIn"
-#define CMD_SID_OPENURL ".uno:OpenUrl"
-#define CMD_SID_OPTIONS ".uno:Options"
-#define CMD_SID_TEMPLATE_MENU   ".uno:TemplateMenu"
-#define CMD_SID_ORGANIZER   ".uno:Organizer"
 #define CMD_SID_PASTE   ".uno:Paste"
 #define CMD_SID_PASTE_SPECIAL   ".uno:PasteSpecial"
 #define CMD_SID_PASTE_ONLY  ".uno:PasteOnly"
@@ -61,11 +46,6 @@
 #define CMD_SID_PRINTPREVIEW".uno:PrintPreview"
 #define CMD_SID_RELOAD  ".uno:Reload"
 #define CMD_SID_BASICIDE_RENAMECURRENT  ".uno:RenameCurrent"
-#define CMD_SID_DOCTEMPLATE ".uno:SaveAsTemplate"
-#define CMD_SID_SEARCH_DLG  ".uno:SearchDialog"
-#define CMD_SID_SHOW_BROWSER".uno:ShowBrowser"
-#define CMD_SID_STYLE_NEW_BY_EXAMPLE".uno:StyleNewByExample"
-#define CMD_SID_INET_DLG".uno:InternetDialog"
 
 #endif
 
diff --git a/include/svx/svxcommands.h b/include/svx/svxcommands.h
index 129c0fb..1cd454f 100644
--- a/include/svx/svxcommands.h
+++ b/include/svx/svxcommands.h
@@ -19,7 +19,6 @@
 #ifndef INCLUDED_SVX_SVXCOMMANDS_H
 #define INCLUDED_SVX_SVXCOMMANDS_H
 
-#define CMD_SID_INET_DLG".uno:InternetDialog"
 #define CMD_SID_OBJECT_ALIGN_CENTER ".uno:AlignCenter"
 #define CMD_SID_OBJECT_ALIGN_DOWN   ".uno:AlignDown"
 #define CMD_SID_OBJECT_ALIGN_LEFT   ".uno:ObjectAlignLeft"
@@ -27,7 +26,6 @@
 #define CMD_SID_OBJECT_ALIGN_RIGHT  ".uno:ObjectAlignRight"
 #define CMD_SID_OBJECT_ALIGN_UP ".uno:AlignUp"
 #define CMD_SID_FM_AUTOCONTROLFOCUS ".uno:AutoControlFocus"
-#define CMD_SID_AUTOFORMAT  ".uno:AutoFormat"
 #define CMD_SID_BEZIER_CLOSE".uno:BezierClose"
 #define CMD_SID_BEZIER_CONVERT  ".uno:BezierConvert"
 #define CMD_SID_BEZIER_CUTLINE  ".uno:BezierCutLine"
@@ -83,12 +81,6 @@
 #define CMD_SID_GALLERY_ENABLE_ADDCOPY  ".uno:GalleryEnableAddCopy"
 #define CMD_SID_GALLERY_FORMATS ".uno:InsertGalleryPic"
 #define CMD_SID_ATTR_GRAF_CROP  ".uno:GrafAttrCrop"
-#define CMD_SID_GRFFILTER_MOSAIC".uno:GraphicFilterMosaic"
-#define CMD_SID_GRFFILTER_POSTER".uno:GraphicFilterPoster"
-#define CMD_SID_GRFFILTER_EMBOSS".uno:GraphicFilterRelief"
-#define CMD_SID_GRFFILTER_SEPIA ".uno:

[Libreoffice-commits] core.git: include/sfx2 include/tools

2014-04-07 Thread Stephan Bergmann
 include/sfx2/objsh.hxx |   47 ++--
 include/tools/ref.hxx  |   82 +
 2 files changed, 75 insertions(+), 54 deletions(-)

New commits:
commit ae91e58350348e0482929230d6c9b281325ff55d
Author: Stephan Bergmann 
Date:   Mon Apr 7 09:26:06 2014 +0200

Unroll sole use of SV_IMPL/DECL_LOCK

Change-Id: I0d4691f700a415d0376e2bc346bc51fbf6a000b2

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index a3d32c9..e35c618 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -720,8 +720,51 @@ public:
 SV_DECL_REF(SfxObjectShell)
 #endif
 
-SV_DECL_LOCK(SfxObjectShell)
-SV_IMPL_LOCK(SfxObjectShell)
+class SfxObjectShellLock
+{
+protected:
+SfxObjectShell * pObj;
+public:
+inline   SfxObjectShellLock() { pObj = 0; }
+inline   SfxObjectShellLock( const SfxObjectShellLock & rObj );
+inline   SfxObjectShellLock( SfxObjectShell * pObjP );
+inline void  Clear();
+inline   ~SfxObjectShellLock();
+inline SfxObjectShellLock & operator = ( const SfxObjectShellLock & rObj );
+inline SfxObjectShellLock & operator = ( SfxObjectShell * pObj );
+inline boolIs() const { return pObj != NULL; }
+inline SfxObjectShell * operator &  () const { return pObj; }
+inline SfxObjectShell * operator -> () const { return pObj; }
+inline SfxObjectShell & operator *  () const { return *pObj; }
+inline operator SfxObjectShell * () const { return pObj; }
+};
+inline SfxObjectShellLock::SfxObjectShellLock( const SfxObjectShellLock & rObj 
)
+{ pObj = rObj.pObj; if( pObj ) { pObj->OwnerLock( true ); } }
+inline SfxObjectShellLock::SfxObjectShellLock( SfxObjectShell * pObjP )
+{ pObj = pObjP; if( pObj ) { pObj->OwnerLock( true ); } }
+inline void SfxObjectShellLock::Clear()
+{
+if( pObj )
+{
+SfxObjectShell* const pRefObj = pObj;
+pObj = 0;
+pRefObj->OwnerLock( false );
+}
+}
+inline SfxObjectShellLock::~SfxObjectShellLock()
+{ if( pObj ) { pObj->OwnerLock( false ); } }
+inline SfxObjectShellLock & SfxObjectShellLock::
+operator = ( const SfxObjectShellLock & rObj )
+{
+if( rObj.pObj ) rObj.pObj->OwnerLock( true );
+SfxObjectShell* const pRefObj = pObj;
+pObj = rObj.pObj;
+if( pRefObj ) { pRefObj->OwnerLock( false ); }
+return *this;
+}
+inline SfxObjectShellLock & SfxObjectShellLock::operator = ( SfxObjectShell * 
pObjP )
+{ return *this = SfxObjectShellLock( pObjP ); }
+
 SV_IMPL_REF(SfxObjectShell)
 
 class AutoReloadTimer_Impl : public Timer
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index bdc055b..e66fbb4 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -22,77 +22,55 @@
 #include 
 #include 
 
-#define PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef, AddNextRef, 
ReleaseRef, pRefbase ) \
+#define SV_DECL_REF( ClassName )\
+class ClassName;\
+class ClassName##Ref\
+{   \
+protected:  \
+ClassName * pObj;   \
+public: \
+inline   ClassName##Ref() { pObj = 0; } \
+inline   ClassName##Ref( const ClassName##Ref & rObj ); \
+inline   ClassName##Ref( ClassName * pObjP );   \
+inline void  Clear();   \
+inline   ~ClassName##Ref(); \
+inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \
+inline ClassName##Ref & operator = ( ClassName * pObj );\
+inline boolIs() const { return pObj != NULL; }  \
+inline ClassName * operator &  () const { return pObj; }\
+inline ClassName * operator -> () const { return pObj; }\
+inline ClassName & operator *  () const { return *pObj; }   \
+inline operator ClassName * () const { return pObj; }   \
+};
+
+#define SV_IMPL_REF( ClassName )\
 inline ClassName##Ref::ClassName##Ref( const ClassName##Ref & rObj )\
-{ pObj = rObj.pObj; if( pObj ) { pRefbase->AddNextRef; } }  \
+{ pObj = rObj.pObj; if( pObj ) { pObj->AddNextRef(); } }\
 inline ClassName##Ref::ClassName##Ref( ClassName * pObjP )  \
-{ pObj = pObjP; if( pObj ) { pRefbase->AddRef; } }  \
+{ pObj = pObjP; if( pObj ) { pObj->AddRef(); } }\
 inline void ClassName##Ref::Clear() \
 {   \
 if( pObj )  \
 {   

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

2014-04-10 Thread Stephan Bergmann
 include/sfx2/childwin.hxx   |2 +
 sfx2/source/appl/appdde.cxx |   23 --
 sfx2/source/appl/appopen.cxx|   28 -
 sfx2/source/appl/fwkhelper.cxx  |5 ++-
 sfx2/source/appl/helpinterceptor.cxx|4 --
 sfx2/source/appl/linksrc.cxx|2 -
 sfx2/source/bastyp/progress.cxx |   19 ---
 sfx2/source/control/bindings.cxx|   20 
 sfx2/source/control/dispatch.cxx|   10 --
 sfx2/source/control/querystatus.cxx |   11 +++---
 sfx2/source/dialog/dinfdlg.cxx  |3 -
 sfx2/source/dialog/dockwin.cxx  |4 --
 sfx2/source/dialog/filedlghelper.cxx|   33 
 sfx2/source/dialog/mailmodel.cxx|   24 --
 sfx2/source/dialog/tabdlg.cxx   |   52 
 sfx2/source/dialog/taskpane.cxx |7 
 sfx2/source/dialog/versdlg.cxx  |   35 ++---
 sfx2/source/doc/SfxDocumentMetaData.cxx |9 ++---
 sfx2/source/doc/docfile.cxx |   42 -
 sfx2/source/doc/docinsert.cxx   |4 --
 sfx2/source/doc/doctempl.cxx|2 -
 sfx2/source/doc/docundomanager.cxx  |1 
 sfx2/source/doc/iframe.cxx  |5 ---
 sfx2/source/doc/new.cxx |1 
 sfx2/source/doc/objserv.cxx |   19 ---
 sfx2/source/doc/objstor.cxx |3 -
 sfx2/source/doc/oleprops.cxx|7 
 sfx2/source/doc/syspath.cxx |2 +
 sfx2/source/explorer/nochaos.cxx|8 +---
 sfx2/source/inc/appopen.hxx |   35 +
 sfx2/source/sidebar/ResourceManager.cxx |9 -
 sfx2/source/sidebar/ResourceManager.hxx |2 -
 sfx2/source/view/frmload.cxx|5 ---
 sfx2/source/view/viewfrm.cxx|   13 
 34 files changed, 77 insertions(+), 372 deletions(-)

New commits:
commit 1d25e1de0b9498e469cb052b2d86bf7f7ae6adae
Author: Stephan Bergmann 
Date:   Thu Apr 10 09:31:46 2014 +0200

Clean up function declarations and some unused functions

Change-Id: I9d6e9df0b686c61597aaa0e194ab321445671a20

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 0dec11a..966056e 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -364,7 +364,9 @@ public:
 ((SfxToolbox*)GetWindow())->FillInfo( aInfo );  \
 return aInfo; }
 
+bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize );
 
+bool GetSplitSizeFromString( const OUString& rStr, Size& rSize );
 
 #endif
 
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 65080b5..c034467 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -44,7 +44,7 @@
 #include 
 #include 
 
-
+#if defined WNT
 
 OUString SfxDdeServiceName_Impl( const OUString& sIn )
 {
@@ -60,7 +60,6 @@ OUString SfxDdeServiceName_Impl( const OUString& sIn )
 return sReturn.makeStringAndClear();
 }
 
-#if defined( WNT )
 class ImplDdeService : public DdeService
 {
 public:
@@ -199,16 +198,19 @@ bool ImplDdeService::SysTopicExecute( const OUString* 
pStr )
 
 class SfxDdeTriggerTopic_Impl : public DdeTopic
 {
+#if defined WNT
 public:
 SfxDdeTriggerTopic_Impl()
 : DdeTopic( "TRIGGER" )
 {}
 
-virtual bool Execute( const OUString* ) SAL_OVERRIDE;
+virtual bool Execute( const OUString* ) SAL_OVERRIDE { return true; }
+#endif
 };
 
 class SfxDdeDocTopic_Impl : public DdeTopic
 {
+#if defined WNT
 public:
 SfxObjectShell* pSh;
 DdeData aData;
@@ -223,6 +225,7 @@ public:
 virtual bool Execute( const OUString* ) SAL_OVERRIDE;
 virtual bool StartAdviseLoop() SAL_OVERRIDE;
 virtual bool MakeItem( const OUString& rItem ) SAL_OVERRIDE;
+#endif
 };
 
 
@@ -555,6 +558,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 
 void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
 {
+#if defined WNT
 DBG_ASSERT( pAppData_Impl->pDocTopics, "There is no Dde-Service" );
 //OV: DDE is disconnected in server mode!
 if( !pAppData_Impl->pDocTopics )
@@ -570,6 +574,9 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
 pAppData_Impl->pDocTopics->erase( 
pAppData_Impl->pDocTopics->begin() + n );
 }
 }
+#else
+(void) pSh;
+#endif
 }
 
 const DdeService* SfxApplication::GetDdeService() const
@@ -582,13 +589,7 @@ DdeService* SfxApplication::GetDdeService()
 return pAppData_Impl->pDdeService;
 }
 
-
-
-bool SfxDdeTriggerTopic_Impl::Execute( const OUString* )
-{
-return true;
-}
-
+#if defined WNT
 
 DdeData* SfxDdeDocTopic_Impl::Get( sal_uIntPtr nFormat )
 {
@@ -648,4 +649,6 @@ bool SfxDdeDocTopic_Impl::StartAdviseLoop()
 return bRet;
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 96f60

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

2014-03-11 Thread Stephan Bergmann
 include/sfx2/XmlIdRegistry.hxx  |2 +-
 sfx2/source/doc/Metadatable.cxx |7 ---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit aeba9c26898ae7b6da814cf012a7c348e64393d7
Author: Stephan Bergmann 
Date:   Tue Mar 11 16:29:34 2014 +0100

No need for GetElementByMetadataReference to be SAL_CALL

Change-Id: I34615c87238d4e96b6c1e81e57fb0822c876b929

diff --git a/include/sfx2/XmlIdRegistry.hxx b/include/sfx2/XmlIdRegistry.hxx
index 3b1dff4..68d6199 100644
--- a/include/sfx2/XmlIdRegistry.hxx
+++ b/include/sfx2/XmlIdRegistry.hxx
@@ -53,7 +53,7 @@ public:
 virtual ~IXmlIdRegistry() { }
 
 virtual ::com::sun::star::uno::Reference<
-::com::sun::star::rdf::XMetadatable > SAL_CALL
+::com::sun::star::rdf::XMetadatable >
 GetElementByMetadataReference(
 const ::com::sun::star::beans::StringPair & i_rXmlId) const = 0;
 
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 3f44618..f2ae8f4 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -150,9 +150,10 @@ public:
 
 /** get the ODF element with the given metadata reference. */
 virtual ::com::sun::star::uno::Reference<
-::com::sun::star::rdf::XMetadatable > SAL_CALL
+::com::sun::star::rdf::XMetadatable >
 GetElementByMetadataReference(
-const ::com::sun::star::beans::StringPair & i_rReference) const;
+const ::com::sun::star::beans::StringPair & i_rReference) const
+SAL_OVERRIDE;
 
 /** register an ODF element at a newly generated, unique metadata 
reference.
 
@@ -364,7 +365,7 @@ XmlIdRegistry::~XmlIdRegistry()
 {
 }
 
-::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > 
SAL_CALL
+::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable >
 XmlIdRegistry::GetElementByMetadataReference(
 const beans::StringPair & i_rReference) const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-03-13 Thread Andre Fischer
 include/sfx2/templdlg.hxx|2 +-
 sfx2/source/inc/templdgi.hxx |2 +-
 sfx2/source/sidebar/SidebarDockingWindow.cxx |6 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 8ad74d8866c77ca52f8c2562b728fc876c23f1c0
Author: Andre Fischer 
Date:   Wed Mar 12 14:21:27 2014 +

Related: #i124392# fill in SidebarDockingWindow::DoDispose

(cherry picked from commit 952f581cb77f52e9aaa974496dc8d86b335cb424)

Conflicts:
sfx2/inc/sfx2/sidebar/SidebarChildWindow.hxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/inc/templdgi.hxx

Change-Id: Idf06437dfc45e02d9e2303df84d52ba0837de108

diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 25b152a..96a03df 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -85,7 +85,7 @@ class SFX2_DLLPUBLIC SfxTemplatePanelControl : public 
DockingWindow
 {
 public:
 SfxTemplatePanelControl (SfxBindings* pBindings, Window* pParentWindow);
-~SfxTemplatePanelControl (void);
+virtual ~SfxTemplatePanelControl();
 
 virtual voidUpdate();
 virtual voidDataChanged( const DataChangedEvent& _rDCEvt );
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 8a4dfdc..f064bba 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -276,7 +276,7 @@ public:
 TYPEINFO();
 
 SfxCommonTemplateDialog_Impl( SfxBindings* pB, Window*, bool );
-~SfxCommonTemplateDialog_Impl();
+virtual ~SfxCommonTemplateDialog_Impl();
 
 DECL_LINK( MenuSelectHdl, Menu * );
 
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx 
b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 259123d..1fb9f0a 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -66,6 +66,12 @@ SidebarDockingWindow::~SidebarDockingWindow (void)
 
 void SidebarDockingWindow::DoDispose (void)
 {
+Reference xComponent 
(static_cast(mpSidebarController.get()), UNO_QUERY);
+mpSidebarController.clear();
+if (xComponent.is())
+{
+xComponent->dispose();
+}
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-29 Thread Stephan Bergmann
 include/sfx2/DocumentMetadataAccess.hxx |2 +-
 include/sfx2/controlwrapper.hxx |2 +-
 include/sfx2/itemconnect.hxx|6 +++---
 include/sfx2/opengrf.hxx|2 +-
 include/sfx2/securitypage.hxx   |2 +-
 include/sfx2/userinputinterception.hxx  |2 +-
 sfx2/source/dialog/taskpane.cxx |   15 ---
 sfx2/source/doc/Metadatable.cxx |4 ++--
 sfx2/source/view/viewimp.hxx|2 +-
 sfx2/source/view/viewsh.cxx |1 -
 10 files changed, 15 insertions(+), 23 deletions(-)

New commits:
commit eba71a4937036bd2e1101a060a28a1ec45f702bf
Author: Stephan Bergmann 
Date:   Mon Sep 29 09:56:54 2014 +0200

sfx2: std::auto_ptr -> std::unique_ptr

Change-Id: I7bac4105494cdbbadd4c4d78ce1fcf03b8ccae6c

diff --git a/include/sfx2/DocumentMetadataAccess.hxx 
b/include/sfx2/DocumentMetadataAccess.hxx
index e0cea27..8178b59 100644
--- a/include/sfx2/DocumentMetadataAccess.hxx
+++ b/include/sfx2/DocumentMetadataAccess.hxx
@@ -198,7 +198,7 @@ public:
 ::com::sun::star::lang::WrappedTargetException, std::exception) 
SAL_OVERRIDE;
 
 private:
-std::auto_ptr m_pImpl;
+std::unique_ptr m_pImpl;
 };
 
 } // namespace sfx2
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index 447bf5c..91b79b0 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -452,7 +452,7 @@ public:
 virtual voidSetControlDontKnow( bool bSet ) SAL_OVERRIDE;
 
 private:
-std::auto_ptr< MultiControlWrapperHelper_Impl > mxImpl;
+std::unique_ptr< MultiControlWrapperHelper_Impl > mxImpl;
 };
 
 
diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx
index a0f2eb6..79fce0c 100644
--- a/include/sfx2/itemconnect.hxx
+++ b/include/sfx2/itemconnect.hxx
@@ -243,8 +243,8 @@ public:
 typedef typename ControlWrpT::ControlType   ControlType;
 typedef typename ControlWrpT::ControlValueType  ControlValueType;
 
-typedef std::auto_ptr< ItemWrpT >   ItemWrapperRef;
-typedef std::auto_ptr< ControlWrpT >ControlWrapperRef;
+typedef std::unique_ptr< ItemWrpT > ItemWrapperRef;
+typedef std::unique_ptr< ControlWrpT >  ControlWrapperRef;
 
 /** Receives pointer to a newly created control wrapper.
 @descr  Takes ownership of the control wrapper. */
@@ -454,7 +454,7 @@ protected:
 virtual boolFillItemSet( SfxItemSet& rDestSet, const SfxItemSet& 
rOldSet ) SAL_OVERRIDE;
 
 private:
-std::auto_ptr< ItemConnectionArrayImpl > mxImpl;
+std::unique_ptr< ItemConnectionArrayImpl > mxImpl;
 };
 
 
diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx
index 83cce38..a38d880 100644
--- a/include/sfx2/opengrf.hxx
+++ b/include/sfx2/opengrf.hxx
@@ -50,7 +50,7 @@ private:
 SFX2_DLLPRIVATE SvxOpenGraphicDialog(const SvxOpenGraphicDialog&);
 SFX2_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const 
SvxOpenGraphicDialog & );
 
-const std::auto_ptr< SvxOpenGrf_Impl >  mpImpl;
+const std::unique_ptr< SvxOpenGrf_Impl >  mpImpl;
 };
 
 #endif // _SVX_OPENGRF_HXX
diff --git a/include/sfx2/securitypage.hxx b/include/sfx2/securitypage.hxx
index eecaf31..2777088 100644
--- a/include/sfx2/securitypage.hxx
+++ b/include/sfx2/securitypage.hxx
@@ -30,7 +30,7 @@ struct SfxSecurityPage_Impl;
 
 class SfxSecurityPage : public SfxTabPage
 {
-std::auto_ptr< SfxSecurityPage_Impl > m_pImpl;
+std::unique_ptr< SfxSecurityPage_Impl > m_pImpl;
 
 protected:
 SfxSecurityPage( vcl::Window* pParent, const SfxItemSet& );
diff --git a/include/sfx2/userinputinterception.hxx 
b/include/sfx2/userinputinterception.hxx
index 5825ac1..539cdb1 100644
--- a/include/sfx2/userinputinterception.hxx
+++ b/include/sfx2/userinputinterception.hxx
@@ -63,7 +63,7 @@ namespace sfx2
 boolhandleNotifyEvent( const NotifyEvent& _rEvent );
 
 private:
-::std::auto_ptr< UserInputInterception_Data >   m_pData;
+::std::unique_ptr< UserInputInterception_Data >   m_pData;
 };
 
 
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 1032a68..be6f0ac 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -862,9 +862,7 @@ namespace sfx2
 DECL_LINK( OnToolboxClicked, ToolBox* );
 DECL_LINK( OnMenuItemSelected, Menu* );
 DECL_LINK( DockingChanged, TitledDockingWindow* );
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr< PopupMenu > impl_createPopupMenu() const;
-SAL_WNODEPRECATED_DECLARATIONS_POP
+::std::unique_ptr< PopupMenu > impl_createPopupMenu() const;
 
 /// sets the given layout for the panel selector
 voidimpl_setLayout( const PanelSelectorLayout i_eLayout, const 
bool i_bForce = false );
@@ -991,9 +989,7 @@ namespace sfx2
 {
 i_pToolBox-

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

2013-07-20 Thread Caolán McNamara
 include/sfx2/sidebar/ControlFactory.hxx |   29 -
 sfx2/source/sidebar/ControlFactory.cxx  |   43 
 unusedcode.easy |4 --
 3 files changed, 1 insertion(+), 75 deletions(-)

New commits:
commit 822577f412214f282588b627fd6addb489f6a9f0
Author: Caolán McNamara 
Date:   Sat Jul 20 18:56:01 2013 +0100

callcatcher: update unused code

Change-Id: Id12614722ed106ca595df13d22b6c5e315deb2ac

diff --git a/include/sfx2/sidebar/ControlFactory.hxx 
b/include/sfx2/sidebar/ControlFactory.hxx
index 2e68730..be66aecb3 100644
--- a/include/sfx2/sidebar/ControlFactory.hxx
+++ b/include/sfx2/sidebar/ControlFactory.hxx
@@ -43,35 +43,6 @@ public:
 
 static ImageRadioButton* CreateTabItem (Window* pParentWindow);
 
-/** Create a tool box that does *not* handle its items.  The
-caller has to register callbacks to process, among others,
-click and selection events.
-*/
-static SidebarToolBox* CreateToolBox (
-Window* pParentWindow,
-const ResId& rResId);
-
-/** Create a tool box that *does* handle its items.  All event
-processing is done by toolbox controllers.
-*/
-static SidebarToolBox* CreateToolBox (
-Window* pParentWindow,
-const ResId& rResId,
-const ::com::sun::star::uno::Reference& 
rxFrame);
-
-/** Create a window that acts as background of a tool box.
-In general it is slightly larger than the tool box.
-@param pParentWindow
-The parent window of the new background control.
-@param bShowBorder
-When  then the background control is made slightly
-larger then its tool box child, once that is created.
-Otherwise the background control will not be visible.
-*/
-static Window* CreateToolBoxBackground (
-Window* pParentWindow,
-const bool bShowBorder = true);
-
 static ImageRadioButton* CreateCustomImageRadionButton(
 Window* pParentWindow,
 const ResId& rResId );
diff --git a/sfx2/source/sidebar/ControlFactory.cxx 
b/sfx2/source/sidebar/ControlFactory.cxx
index 4825ca7..1b79267 100644
--- a/sfx2/source/sidebar/ControlFactory.cxx
+++ b/sfx2/source/sidebar/ControlFactory.cxx
@@ -45,49 +45,6 @@ ImageRadioButton* ControlFactory::CreateTabItem (Window* 
pParentWindow)
 
 
 
-SidebarToolBox* ControlFactory::CreateToolBox (
-Window* pParentWindow,
-const ResId& rResId)
-{
-SidebarToolBox* pToolBox = new SidebarToolBox(pParentWindow, rResId, NULL);
-pToolBox->SetBorderWindow(pParentWindow);
-
-pToolBox->Invalidate();
-
-return pToolBox;
-}
-
-
-
-
-SidebarToolBox* ControlFactory::CreateToolBox (
-Window* pParentWindow,
-const ResId& rResId,
-const cssu::Reference& rxFrame)
-{
-SidebarToolBox* pToolBox = new SidebarToolBox(pParentWindow, rResId, 
rxFrame);
-pToolBox->SetBorderWindow(pParentWindow);
-
-pToolBox->Invalidate();
-
-return pToolBox;
-}
-
-
-
-
-Window* ControlFactory::CreateToolBoxBackground (
-Window* pParentWindow,
-const bool bShowBorder)
-{
-ToolBoxBackground* pBorderWindow = new ToolBoxBackground(pParentWindow, 
bShowBorder);
-pBorderWindow->Show();
-return pBorderWindow;
-}
-
-
-
-
 ImageRadioButton* ControlFactory::CreateCustomImageRadionButton(
 Window* pParentWindow,
 const ResId& rResId )
diff --git a/unusedcode.easy b/unusedcode.easy
index 9dfa7a3..6f80115 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -49,7 +49,7 @@ ScDocument::GetFormulaTokens(ScAddress const&) const
 ScDocument::GetStringCell(ScAddress const&) const
 ScDocument::IsEmptyData(short, short) const
 ScExtIButton::GetSelected() const
-ScFilterDlg::LinkStubMoreClickHdl(void*, void*)
+ScFormulaCell::GetResultDouble() const
 ScFormulaCell::HasColRowName() const
 ScFormulaCell::IsSharedInvariant() const
 ScFormulaCell::SetResultToken(formula::FormulaToken const*)
@@ -179,8 +179,6 @@ sdr::table::SdrTableObj::getRowCount() const
 sfx2::sidebar::AsynchronousCall::RequestCall(boost::function const&)
 
sfx2::sidebar::Context::EvaluateMatch(std::__debug::vector > const&) const
 sfx2::sidebar::ContextList::IsEmpty()
-sfx2::sidebar::ControlFactory::CreateToolBox(Window*, ResId const&)
-sfx2::sidebar::ControlFactory::CreateToolBox(Window*, ResId const&, 
com::sun::star::uno::Reference const&)
 sfx2::sidebar::ControlFactory::CreateToolBoxBackground(Window*, bool)
 sfx2::sidebar::Deck::GetIconURL(bool) const
 
sfx2::sidebar::Deck::PrintWindowTree(std::__debug::vector > const&)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-08 Thread Krisztian Pinter
 include/sfx2/recentdocsview.hxx|   61 +
 include/sfx2/recentdocsviewitem.hxx|   26 
 include/sfx2/thumbnailviewitem.hxx |2 
 sfx2/Library_sfx.mk|2 
 sfx2/source/control/recentdocsview.cxx |  183 +
 sfx2/source/control/recentdocsviewitem.cxx |   53 
 6 files changed, 326 insertions(+), 1 deletion(-)

New commits:
commit 9cf4be5ce8116eb447abea024f07456275d4ef4a
Author: Krisztian Pinter 
Date:   Thu Aug 8 17:41:07 2013 +0200

startcenter: Add RecentDocsView for displaying thumbnails for recent docs

Change-Id: I6d9bb87a6ee28d62ee012e6807d1c5a4f3219e27

diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
new file mode 100644
index 000..6ae9391
--- /dev/null
+++ b/include/sfx2/recentdocsview.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __SFX2_RECENTDOCSVIEW_HXX__
+#define __SFX2_RECENTDOCSVIEW_HXX__
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+struct LoadRecentFile
+{
+::com::sun::star::util::URL
 aTargetURL;
+::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >  
 aArgSeq;
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > 
 xDispatch;
+};
+
+class SFX2_DLLPUBLIC RecentDocsView :   protected ::comphelper::OBaseMutex,
+public ThumbnailView
+{
+public:
+RecentDocsView( Window* pParent );
+virtual ~RecentDocsView();
+
+void insertItem(const OUString &rURL, const OUString &rTitle);
+void loadRecentDocs();
+
+virtual Size GetOptimalSize() const;
+
+void SetThumbnailSize(long ThumbnailWidth, long ThumbnailHeight);
+void SetHeight(long Height);
+
+DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, LoadRecentFile* );
+
+protected:
+virtual void OnItemDblClicked(ThumbnailViewItem *pItem);
+
+longmnItemMaxWidth;
+longmnItemMaxHeight;
+longmnItemPadding;
+longmnItemMaxTextLength;
+longmnItemThumbnailMaxHeight;
+longmnItemMaxHeightSub;
+
+long mnHeight;
+
+int mnMaxThumbnailItems;
+};
+
+#endif  // __SFX2_RECENTDOCSVIEW_HXX__
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
new file mode 100644
index 000..05ae15ae
--- /dev/null
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __SFX2_RECENTDOCSVIEWITEM_HXX__
+#define __SFX2_RECENTDOCSVIEWITEM_HXX__
+
+#include 
+
+class RecentDocsViewItem : public ThumbnailViewItem
+{
+public:
+RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL, const 
OUString &rTitle);
+virtual void setEditTitle (bool edit, bool bChangeFocus = true);
+
+OUString maURL;
+};
+
+#endif  // __SFX2_RECENTDOCSVIEWITEM_HXX__
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/thumbnailviewitem.hxx 
b/include/sfx2/thumbnailviewitem.hxx
index 64a20cd..2272bc5 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -89,7 +89,7 @@ public:
 
 void setHighlight (bool state);
 
-void setEditTitle (bool edit, bool bChangeFocus = true);
+virtual void setEditTitle (bool edit, bool bChangeFocus = true);
 void updateTitleEditSize ();
 virtual void setTitle (const OUString& rTitle);
 
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 4b8f424..836f232 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -134,6 +134,8 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
 sfx2/source/control/msgpool \
 sfx2/source/control/objface \
 sfx2/source/control/querystatus \
+sfx2/source/control/recentdocsview \
+sfx2/source/control/recentdocsviewitem \
 sfx2/source/control/request \
 sfx2/source/control/sfxstatuslistener \
 sfx2/source/control/shell \
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
new file mode 100644
index 000..a1654a5
--- /dev/null
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -0,0 +1,183 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the Libre

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

2013-07-09 Thread Krisztian Pinter
 include/sfx2/thumbnailview.hxx   |9 
 sd/source/ui/sidebar/MasterPageContainerProviders.cxx|   98 
-
 sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx |   98 
-
 sfx2/source/control/templateabstractview.cxx |   98 
-
 sfx2/source/control/thumbnailview.cxx|  103 
++
 5 files changed, 117 insertions(+), 289 deletions(-)

New commits:
commit 767af37a0e9f88737690bf3456df28315cc3f477
Author: Krisztian Pinter 
Date:   Tue Jul 9 02:51:16 2013 +0200

Remove duplicate code for reading thumbnails

Change-Id: I51de8d07a4dc51ba03d24a1a5805df051b6e09b4
Reviewed-on: https://gerrit.libreoffice.org/4779
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index dbbe57d..823e6ad 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -15,9 +15,16 @@
 #include 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+
+#include 
+#include 
+#include 
 
 class BitmapEx;
 class MouseEvent;
@@ -242,6 +249,8 @@ public:
 
 virtual bool renameItem(ThumbnailViewItem* pItem, OUString sNewTitle);
 
+static BitmapEx readThumbnail(const OUString &msURL);
+
 protected:
 
 virtual void KeyInput( const KeyEvent& rKEvt );
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx 
b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 448b8c8..8d52d1f 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -107,102 +108,7 @@ Image TemplatePreviewProvider::operator() (
 (void)pPage;
 (void)rRenderer;
 
-// Load the thumbnail from a template document.
-uno::Reference xIStream;
-
-uno::Reference< uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
-try
-{
-uno::Reference xStorageFactory = 
embed::StorageFactory::create(xContext);
-
-uno::Sequence aArgs (2);
-aArgs[0] <<= msURL;
-aArgs[1] <<= embed::ElementModes::READ;
-uno::Reference xDocStorage (
-xStorageFactory->createInstanceWithArguments(aArgs),
-uno::UNO_QUERY);
-
-try
-{
-if (xDocStorage.is())
-{
-uno::Reference xStorage (
-xDocStorage->openStorageElement(
-"Thumbnails",
-embed::ElementModes::READ));
-if (xStorage.is())
-{
-uno::Reference xThumbnailCopy (
-xStorage->cloneStreamElement("thumbnail.png"));
-if (xThumbnailCopy.is())
-xIStream = xThumbnailCopy->getInputStream();
-}
-}
-}
-catch (const uno::Exception& rException)
-{
-OSL_TRACE (
-"caught exception while trying to access 
Thumbnail/thumbnail.png of %s: %s",
-OUStringToOString(msURL,
-RTL_TEXTENCODING_UTF8).getStr(),
-OUStringToOString(rException.Message,
-RTL_TEXTENCODING_UTF8).getStr());
-}
-
-try
-{
-// An (older) implementation had a bug - The storage
-// name was "Thumbnail" instead of "Thumbnails".  The
-// old name is still used as fallback but this code can
-// be removed soon.
-if ( ! xIStream.is())
-{
-uno::Reference xStorage (
-xDocStorage->openStorageElement( "Thumbnail",
-embed::ElementModes::READ));
-if (xStorage.is())
-{
-uno::Reference xThumbnailCopy (
-xStorage->cloneStreamElement("thumbnail.png"));
-if (xThumbnailCopy.is())
-xIStream = xThumbnailCopy->getInputStream();
-}
-}
-}
-catch (const uno::Exception& rException)
-{
-OSL_TRACE (
-"caught exception while trying to access 
Thumbnails/thumbnail.png of %s: %s",
-OUStringToOString(msURL,
-RTL_TEXTENCODING_UTF8).getStr(),
-OUStringToOString(rException.Message,
-RTL_TEXTENCODING_UTF8).getStr());
-}
-}
-catch (const uno::Exception& rException)
-{
-OSL_TRACE (
-"caught exception while trying to access tuhmbnail of %s: %s",
-OUStringToOString(msURL,
-RTL_TEXTENCODING_UTF8).getStr(),
-OUStringToOString(rException.Message,
-RTL_TEXTENCODING_UTF8).getStr());
-

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

2013-09-03 Thread Caolán McNamara
 include/sfx2/tbxctrl.hxx |4 
 sfx2/source/toolbox/tbxitem.cxx  |   17 +
 sw/source/ui/inc/navipi.hxx  |2 +-
 sw/source/ui/inc/workctrl.hxx|2 +-
 sw/source/ui/ribbar/workctrl.cxx |8 
 sw/source/ui/utlui/navipi.cxx|9 -
 6 files changed, 31 insertions(+), 11 deletions(-)

New commits:
commit ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e
Author: Caolán McNamara 
Date:   Tue Sep 3 16:46:22 2013 +0100

Resolves: fdo#68726 make navigator child dialog float on top

i.e. set its parent to the thing it wants to be on top of

As an aside I'm not entirely sure that this little dialog has the 
decorations
set on it that it would like, I suspect it wants to be more like the
tearable-off font color floatingwindow. But lets not muddy the waters in 
this
commit.

Change-Id: I9e0c35fbb66e50c04c7b28904d3937cf9ae417f4

diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index af1b1a6..3d403766 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -146,6 +146,10 @@ public:
 const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
 Window* pParentWindow,
 WinBits nBits );
+SfxPopupWindow( sal_uInt16 nId,
+const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+Window* pParentWindow,
+const ResId &rId );
 ~SfxPopupWindow();
 
 virtual SfxPopupWindow* Clone() const;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index ea1d317..928b771 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1208,6 +1208,23 @@ SfxPopupWindow::SfxPopupWindow(
 ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
 }
 
+SfxPopupWindow::SfxPopupWindow(
+sal_uInt16 nId,
+const Reference< XFrame >& rFrame,
+Window* pParentWindow,
+const ResId &rId ) :
+FloatingWindow( pParentWindow, rId )
+, m_bFloating(sal_False)
+, m_bCascading( sal_False )
+, m_nId( nId )
+, m_xFrame( rFrame )
+, m_pStatusListener( 0 )
+{
+Window* pWindow = GetTopMostParentSystemWindow( this );
+if ( pWindow )
+((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
+}
+
 //
 
 SfxPopupWindow::~SfxPopupWindow()
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 1082a6a..4e339cf 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -168,7 +168,7 @@ public:
 sal_BoolIsGlobalMode() const {returnbGlobalMode;}
 
 SwView* GetCreateView() const;
-voidCreateNavigationTool(const Rectangle& rRect, bool 
bSetFocus);
+voidCreateNavigationTool(const Rectangle& rRect, bool 
bSetFocus, Window *pParent);
 };
 
 class SwNavigationChild : public SfxChildWindowContext
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index be38a29..dcba591 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -162,7 +162,7 @@ protected:
 virtual voidDataChanged( const DataChangedEvent& rDCEvt );
 
 public:
-SwScrollNaviPopup( sal_uInt16 nId, const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+SwScrollNaviPopup( sal_uInt16 nId, const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, 
Window *pParent );
 ~SwScrollNaviPopup();
 
 static String   GetQuickHelpText(sal_Bool bNext);
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 91d8f59..0c92c28 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -452,8 +452,8 @@ static const char* aNavigationHelpIds[ NAVI_ENTRIES ] =
 HID_NID_NEXT
 };
 
-SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame 
>& rFrame )
-: SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ),
+SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame 
>& rFrame, Window *pParent)
+: SfxPopupWindow(nId, rFrame, pParent, SW_RES(RID_SCROLL_NAVIGATION_WIN)),
 aToolBox(this, 0),
 aSeparator(this, SW_RES(FL_SEP)),
 aInfoField(this, SW_RES(FI_INFO)),
@@ -540,7 +540,7 @@ void SwScrollNaviPopup::ApplyImageList()
 
 SfxPopupWindow* SwScrollNaviPopup::Clone() const
 {
-return new SwScrollNaviPopup( GetId(), GetFrame() );
+return new SwScrollNaviPopup( GetId(), GetFrame(), GetParent() );
 }
 
 IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
@@ -602,7 +6

[Libreoffice-commits] core.git: include/sfx2 include/svtools include/tools

2014-05-15 Thread Thomas Arnhold
 include/sfx2/doctempl.hxx|6 +++---
 include/sfx2/mgetempl.hxx|4 ++--
 include/sfx2/mnumgr.hxx  |6 +++---
 include/sfx2/msgpool.hxx |4 ++--
 include/sfx2/new.hxx |4 ++--
 include/sfx2/newstyle.hxx|4 ++--
 include/sfx2/prnmon.hxx  |4 ++--
 include/sfx2/styledlg.hxx|4 ++--
 include/sfx2/templdlg.hxx|4 ++--
 include/sfx2/tplpitem.hxx|4 ++--
 include/svtools/ctrlbox.hxx  |6 +++---
 include/svtools/ctrltool.hxx |6 +++---
 include/svtools/ruler.hxx|6 +++---
 include/svtools/scrwin.hxx   |4 ++--
 include/svtools/stdmenu.hxx  |6 +++---
 include/svtools/valueset.hxx |6 +++---
 include/tools/config.hxx |4 ++--
 17 files changed, 41 insertions(+), 41 deletions(-)

New commits:
commit ec08cb1f81d47e8f41778bf519ead43bfb90e67c
Author: Thomas Arnhold 
Date:   Thu May 15 17:52:21 2014 +0200

fixincludeguards.pl: now we can fix those

Change-Id: I8f29f6344592c2bb1ae0d03304cf6e18b6df3a29

diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx
index 6ba3a18..0d01210 100644
--- a/include/sfx2/doctempl.hxx
+++ b/include/sfx2/doctempl.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFXDOCTEMPL_HXX
-#define _SFXDOCTEMPL_HXX
+#ifndef INCLUDED_SFX2_DOCTEMPL_HXX
+#define INCLUDED_SFX2_DOCTEMPL_HXX
 
 #include 
 #include 
@@ -133,7 +133,7 @@ public:
 voidUpdate( bool _bSmart = true );
 };
 
-#endif // #ifndef _SFXDOCTEMPL_HXX
+#endif // INCLUDED_SFX2_DOCTEMPL_HXX
 
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 65ba711..6082fbe 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFX_MGETEMPL_HXX
-#define _SFX_MGETEMPL_HXX
+#ifndef INCLUDED_SFX2_MGETEMPL_HXX
+#define INCLUDED_SFX2_MGETEMPL_HXX
 
 #include 
 #include 
diff --git a/include/sfx2/mnumgr.hxx b/include/sfx2/mnumgr.hxx
index 88dd9e2..66c9d6f 100644
--- a/include/sfx2/mnumgr.hxx
+++ b/include/sfx2/mnumgr.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFXMNUMGR_HXX
-#define _SFXMNUMGR_HXX
+#ifndef INCLUDED_SFX2_MNUMGR_HXX
+#define INCLUDED_SFX2_MNUMGR_HXX
 
 #include 
 #include 
@@ -105,6 +105,6 @@ public:
 Menu*   GetSVMenu();
 };
 
-#endif // #ifndef _SFXMNUMGR_HXX
+#endif // INCLUDED_SFX2_MNUMGR_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/msgpool.hxx b/include/sfx2/msgpool.hxx
index be61a4cf..f21277e 100644
--- a/include/sfx2/msgpool.hxx
+++ b/include/sfx2/msgpool.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFXMSGPOOL_HXX
-#define _SFXMSGPOOL_HXX
+#ifndef INCLUDED_SFX2_MSGPOOL_HXX
+#define INCLUDED_SFX2_MSGPOOL_HXX
 
 #include 
 #include 
diff --git a/include/sfx2/new.hxx b/include/sfx2/new.hxx
index bc1a452..c817282 100644
--- a/include/sfx2/new.hxx
+++ b/include/sfx2/new.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFXNEW_HXX
-#define _SFXNEW_HXX
+#ifndef INCLUDED_SFX2_NEW_HXX
+#define INCLUDED_SFX2_NEW_HXX
 
 #include 
 #include 
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index 6ced44b..1a646e6 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _NEWSTYLE_HXX
-#define _NEWSTYLE_HXX
+#ifndef INCLUDED_SFX2_NEWSTYLE_HXX
+#define INCLUDED_SFX2_NEWSTYLE_HXX
 
 #include 
 #include 
diff --git a/include/sfx2/prnmon.hxx b/include/sfx2/prnmon.hxx
index 0a6b635..eead7a3 100644
--- a/include/sfx2/prnmon.hxx
+++ b/include/sfx2/prnmon.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFX_PRNMON_HXX
-#define _SFX_PRNMON_HXX
+#ifndef INCLUDED_SFX2_PRNMON_HXX
+#define INCLUDED_SFX2_PRNMON_HXX
 
 #include 
 #include 
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index fec8446..eb6d152 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SFX_STYLEDLG_HXX
-#define _SFX_STYLEDLG_

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

2014-07-17 Thread Noel Grandin
 include/sfx2/frame.hxx   |4 ++--
 include/tools/ref.hxx|   10 +-
 sfx2/source/doc/docfile.cxx  |2 +-
 sfx2/source/doc/sfxbasemodel.cxx |4 ++--
 sfx2/source/view/frame.cxx   |2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 490d30281726052bf4c36d4b79136ec7e7fd8395
Author: Noel Grandin 
Date:   Thu Jul 10 15:49:31 2014 +0200

rename the Weak stuff in tools/ref.hxx to WeakRef

.. which more accurately reflects it's purpose

Change-Id: Ibb87a47a3d1f3e35ac2820f14c71adf3b227c961
Reviewed-on: https://gerrit.libreoffice.org/10283
Reviewed-by: Thomas Arnhold 
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 8730dbd..18bf6cd 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -209,7 +209,7 @@ private:
 SAL_DLLPRIVATE void Construct_Impl();
 };
 
-SV_DECL_COMPAT_WEAK( SfxFrame )
+SV_DECL_COMPAT_WEAK_REF( SfxFrame )
 
 class SfxFrameIterator
 {
@@ -229,7 +229,7 @@ public:
 class SFX2_DLLPUBLIC SfxFrameItem: public SfxPoolItem
 {
 SfxFrame*   pFrame;
-SfxFrameWeakwFrame;
+SfxFrameWeakRef wFrame;
 SAL_DLLPRIVATE void SetFramePtr_Impl( SfxFrame* /*pFrameP*/ ) { pFrame = 
wFrame; }
 
 public:
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index 1cd1474..1d5a37a 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -221,16 +221,16 @@ public:
 SvCompatWeakHdl* GetHdl() { return _xHdl; }
 };
 
-#define SV_DECL_COMPAT_WEAK( ClassName )\
-class ClassName##Weak   \
+#define SV_DECL_COMPAT_WEAK_REF( ClassName )\
+class ClassName##WeakRef\
 {   \
 tools::SvRef _xHdl;\
 public: \
-inline   ClassName##Weak( ) {}  \
-inline   ClassName##Weak( ClassName* pObj ) {   \
+inline   ClassName##WeakRef( ) {}   \
+inline   ClassName##WeakRef( ClassName* pObj ) {\
 if( pObj ) _xHdl = pObj->GetHdl(); }\
 inline void  Clear() { _xHdl.Clear(); } \
-inline ClassName##Weak& operator = ( ClassName * pObj ) {   \
+inline ClassName##WeakRef& operator = ( ClassName * pObj ) {\
 _xHdl = pObj ? pObj->GetHdl() : 0; return *this; }  \
 inline boolIs() const { \
 return _xHdl.Is() && _xHdl->GetObj(); } \
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4cb807d..67e7d10 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -207,7 +207,7 @@ public:
 const SfxFilter* pOrigFilter;
 OUStringaOrigURL;
 DateTime aExpireTime;
-SfxFrameWeak wLoadTargetFrame;
+SfxFrameWeakRef  wLoadTargetFrame;
 SvKeyValueIteratorRef xAttributes;
 
 svtools::AsynchronLink  aDoneLink;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index eb50885..eac066e 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -4193,8 +4193,8 @@ namespace sfx { namespace intern {
 }
 
 private:
-boolm_bSuccess;
-SfxFrameWeakm_aWeakFrame;
+bool m_bSuccess;
+SfxFrameWeakRef  m_aWeakFrame;
 };
 } }
 
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 1c2d447..63a82c8 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -310,7 +310,7 @@ void SfxFrame::CancelTransfers( bool /*bCancelLoadEnv*/ )
 GetChildFrame( n )->CancelTransfers();
 
 //  Check if StarOne-Loader should be canceled
-SfxFrameWeak wFrame( this );
+SfxFrameWeakRef wFrame( this );
 if (wFrame.Is())
 pImp->bInCancelTransfers = false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-25 Thread Noel Grandin
 include/sfx2/frame.hxx|6 +--
 include/tools/ref.hxx |   69 +++---
 sfx2/source/view/frame.cxx|6 ---
 sfx2/source/view/frame2.cxx   |3 +
 sfx2/source/view/impframe.hxx |5 +--
 5 files changed, 44 insertions(+), 45 deletions(-)

New commits:
commit 2295697df9c66f4b19d6874106729fede51ec93d
Author: Noel Grandin 
Date:   Thu Jul 10 17:05:19 2014 +0200

convert the weak reference macro in tools into a template

which required making SfxFrame subclass SvCompatWeakBase,
but that makes the relationships clearer anyhow.

Change-Id: I209d05359d50111eacac72c971bb46ccf569ba49
Reviewed-on: https://gerrit.libreoffice.org/10285
Tested-by: LibreOffice gerrit bot 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 18bf6cd..7a64d9b 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -75,7 +75,6 @@ class SfxDispatcher;
 class Rectangle;
 class SfxRequest;
 class SfxUnoControllerItem;
-class SvCompatWeakHdl;
 class SystemWindow;
 
 class SfxFrame;
@@ -97,7 +96,7 @@ typedef ::std::vector TargetList;
 // from their parent frames.
 
 
-class SFX2_DLLPUBLIC SfxFrame
+class SFX2_DLLPUBLIC SfxFrame : public SvCompatWeakBase
 {
 friend class SfxFrameIterator;
 friend class SfxFrameWindow_Impl;
@@ -125,7 +124,6 @@ public:
 CreateBlankFrame();
 static SfxFrame*Create( SfxObjectShell& rDoc, Window& rWindow, 
sal_uInt16 nViewId, bool bHidden );
 
-SvCompatWeakHdl*GetHdl();
 Window& GetWindow() const { return *pWindow;}
 voidCancelTransfers( bool bCancelLoadEnv = true );
 boolDoClose();
@@ -209,7 +207,7 @@ private:
 SAL_DLLPRIVATE void Construct_Impl();
 };
 
-SV_DECL_COMPAT_WEAK_REF( SfxFrame )
+typedef SvCompatWeakRef SfxFrameWeakRef;
 
 class SfxFrameIterator
 {
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index 98740f0..ed34f41 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -189,56 +189,63 @@ public:
 { return nRefCount; }
 };
 
-/** We only have one weak reference in LO, in include/sfx2/frame.hxx, class 
SfxFrameWeak.
-This acts as a intermediary between SfxFrameWeak and SfxFrame_Impl.
+template
+class SvCompatWeakBase;
+
+/** SvCompatWeakHdl acts as a intermediary between SvCompatWeakRef and T.
 */
+template
 class SvCompatWeakHdl : public SvRefBase
 {
-friend class SvCompatWeakBase;
-void* _pObj;
+friend class SvCompatWeakBase;
+T* _pObj;
 
-SvCompatWeakHdl( void* pObj ) : _pObj( pObj ) {}
+SvCompatWeakHdl( T* pObj ) : _pObj( pObj ) {}
 
 public:
 void  ResetWeakBase( ) { _pObj = 0; }
-void* GetObj(){ return _pObj; }
+T*GetObj(){ return _pObj; }
 };
 
-/** We only have one place that extends this, in 
sfx2/source/view/impframe.hxx, class SfxFrame_Impl,
-its function is to notify the SvCompatWeakHdl when an SfxFrame_Impl object 
is deleted.
+/** We only have one place that extends this, in include/sfx2/frame.hxx, class 
SfxFrame.
+Its function is to notify the SvCompatWeakHdl when an SfxFrame object is 
deleted.
 */
+template
 class SvCompatWeakBase
 {
-tools::SvRef _xHdl;
+tools::SvRef< SvCompatWeakHdl > _xHdl;
 
 public:
-// Does not use initializer due to compiler warnings,
-// because the lifetime of the _xHdl object can exceed the lifetime of 
this class.
-SvCompatWeakBase( void* pObj ) { _xHdl = new SvCompatWeakHdl( pObj ); }
+/** Does not use initializer due to compiler warnings,
+because the lifetime of the _xHdl object can exceed the lifetime of 
this class.
+ */
+SvCompatWeakBase( T* pObj ) { _xHdl = new SvCompatWeakHdl( pObj ); }
 
 ~SvCompatWeakBase() { _xHdl->ResetWeakBase(); }
 
-SvCompatWeakHdl* GetHdl() { return _xHdl; }
+SvCompatWeakHdl* GetHdl() { return _xHdl; }
 };
 
-#define SV_DECL_COMPAT_WEAK_REF( ClassName )\
-class ClassName##WeakRef\
-{   \
-tools::SvRef _xHdl;\
-public: \
-inline   ClassName##WeakRef( ) {}   \
-inline   ClassName##WeakRef( ClassName* pObj ) {\
-if( pObj ) _xHdl = pObj->GetHdl(); }\
-inline ClassName##WeakRef& operator = ( ClassName * pObj ) {\
-_xHdl = pObj ? pObj->GetHdl() : 0; return *this; }  \
-inline boolIs() const { \
-return _xHdl.Is() && _xHdl->GetObj(); } \
-inline ClassName * operator -> () const {   \
-return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \
-inline Cl

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

2014-09-19 Thread Tomaž Vajngerl
 include/sfx2/sfxcommands.h |1 +
 include/sfx2/sfxsids.hrc   |1 +
 sfx2/sdi/sfx.sdi   |   24 
 sw/source/ui/app/mn.src|9 -
 4 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit 5398664eed621fbcc644ff949d4841590973bfa3
Author: Tomaž Vajngerl 
Date:   Fri Sep 19 17:51:52 2014 +0200

fdo#62947 make IDs unique, fixes, better names

Change-Id: I6cbfd43f037fe89e0f753c67c9368b981b85bd35

diff --git a/include/sfx2/sfxcommands.h b/include/sfx2/sfxcommands.h
index cde5f46..e9b1b11 100644
--- a/include/sfx2/sfxcommands.h
+++ b/include/sfx2/sfxcommands.h
@@ -39,6 +39,7 @@
 #define CMD_SID_GALLERY_BG_BRUSH".uno:BackgroundImage"
 #define CMD_SID_PASTE   ".uno:Paste"
 #define CMD_SID_PASTE_SPECIAL   ".uno:PasteSpecial"
+#define CMD_SID_PASTE_UNFORMATTED   ".uno:PasteUnformatted"
 #define CMD_SID_PASTE_ONLY  ".uno:PasteOnly"
 #define CMD_SID_PASTE_ONLY_VALUE".uno:PasteOnlyValue"
 #define CMD_SID_PASTE_ONLY_TEXT ".uno:PasteOnlyText"
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 0ecdffa..5d31ca0 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -408,6 +408,7 @@
 #define SID_CUT (SID_SFX_START + 710)
 #define SID_COPY(SID_SFX_START + 711)
 #define SID_PASTE   (SID_SFX_START + 712)
+#define SID_MENU_PASTE_SPECIAL  (SID_SFX_START + 713)
 
 #define SID_BACKSPACE   (SID_SFX_START + 714)
 #define SID_FORMATPAINTBRUSH(SID_SFX_START + 715)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index f893324..2016f48 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -4516,6 +4516,30 @@ SfxInt16Item PasteSpecial SID_PASTE_SPECIAL
 GroupId = GID_EDIT;
 ]
 
+SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED
+(SfxUInt32Item Format SID_PASTE_UNFORMATTED)
+[
+/* flags: */
+AutoUpdate = FALSE,
+Cachable = Cachable,
+FastCall = FALSE,
+HasCoreId = FALSE,
+HasDialog = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+Asynchron;
+
+/* config: */
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+StatusBarConfig = FALSE,
+ToolBoxConfig = TRUE,
+GroupId = GID_EDIT;
+]
+
 SfxVoidItem PasteOnly SID_PASTE_ONLY
 ()
 [
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index 03c301c..2b94310 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -295,11 +295,10 @@
 Text[ en-US ] = "Down One Level";  \
 };
 
-#define MN_NEW_PASTE_SPECIAL \
+#define MENU_PASTE_SPECIAL \
 MenuItem\
 {\
-Identifier = SID_PASTE_SPECIAL ; \
-HelpId =  CMD_SID_PASTE_SPECIAL ; \
+Identifier = SID_MENU_PASTE_SPECIAL ; \
 Text [ en-US ] = "Paste ~Special" ; \
 SubMenu = Menu\
 {\
@@ -308,7 +307,7 @@
 MenuItem\
 {\
 Identifier = SID_PASTE_UNFORMATTED ; \
-HelpId =  CMD_SID_PASTE_SPECIAL ; \
+HelpId =  CMD_SID_PASTE_UNFORMATTED ; \
 Text [ en-US ] = "~Text Only" ; \
 };\
 MenuItem\
@@ -325,7 +324,7 @@
 {   \
 ItemList =  \
 {   \
-MN_NEW_PASTE_SPECIAL\
+MENU_PASTE_SPECIAL  \
 MN_RESET\
 _NUMBERING_RELATED_MENU \
 SEPARATOR ; \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-06 Thread Tor Lillqvist
 include/sfx2/sidebar/ContextChangeBroadcaster.hxx |   68 --
 include/sfx2/sidebar/PopupContainer.hxx   |   40 
 sfx2/inc/sidebar/ContextChangeBroadcaster.hxx |   68 ++
 sfx2/inc/sidebar/PopupContainer.hxx   |   40 
 sfx2/source/control/shell.cxx |2 
 sfx2/source/sidebar/ContextChangeBroadcaster.cxx  |2 
 sfx2/source/sidebar/PopupContainer.cxx|2 
 7 files changed, 111 insertions(+), 111 deletions(-)

New commits:
commit 5e80dd672fe64d44e05a2025e9569afdd62bb0d7
Author: Tor Lillqvist 
Date:   Tue May 6 15:00:41 2014 +0300

Move a few more headers that are included only in sfx2 to sfx2

Change-Id: I8bd81a45f5ef1b76fce1563b06e05a4eefcff0ec

diff --git a/include/sfx2/sidebar/ContextChangeBroadcaster.hxx 
b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx
similarity index 100%
rename from include/sfx2/sidebar/ContextChangeBroadcaster.hxx
rename to sfx2/inc/sidebar/ContextChangeBroadcaster.hxx
diff --git a/include/sfx2/sidebar/PopupContainer.hxx 
b/sfx2/inc/sidebar/PopupContainer.hxx
similarity index 100%
rename from include/sfx2/sidebar/PopupContainer.hxx
rename to sfx2/inc/sidebar/PopupContainer.hxx
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index b1f0aa2..49e9eba 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -42,7 +42,7 @@
 #include 
 #include "statcach.hxx"
 #include 
-#include 
+#include 
 
 #include 
 
diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx 
b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
index f29fffa..975fb3e 100644
--- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
+++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
@@ -16,7 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sfx2/source/sidebar/PopupContainer.cxx 
b/sfx2/source/sidebar/PopupContainer.cxx
index 2ec4c56..9167dd6 100644
--- a/sfx2/source/sidebar/PopupContainer.cxx
+++ b/sfx2/source/sidebar/PopupContainer.cxx
@@ -18,7 +18,7 @@
  */
 #include "precompiled_sfx2.hxx"
 
-#include 
+#include 
 
 namespace sfx2 { namespace sidebar {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-13 Thread Takeshi Abe
 include/sfx2/app.hxx|   20 +++
 include/sfx2/module.hxx |5 
 sfx2/inc/arrdecl.hxx|   41 
 sfx2/source/appl/appchild.cxx   |7 ++
 sfx2/source/appl/appmisc.cxx|   25 
 sfx2/source/appl/appreg.cxx |7 ++
 sfx2/source/appl/childwin.cxx   |9 +++-
 sfx2/source/appl/module.cxx |9 +++-
 sfx2/source/appl/workwin.cxx|5 +---
 sfx2/source/inc/appdata.hxx |8 ---
 sfx2/source/menu/mnuitem.cxx|   17 +++-
 sfx2/source/statbar/stbitem.cxx |   17 +++-
 sfx2/source/toolbox/tbxitem.cxx |   17 +++-
 13 files changed, 54 insertions(+), 133 deletions(-)

New commits:
commit a247b8257a904372fcc2330bd8820176d4a71ebd
Author: Takeshi Abe 
Date:   Tue Aug 12 23:58:14 2014 +0900

fdo#75757: remove inheritance to std::vector

... by replacing the following 3 classes with typedefs of std::vector:
 SfxObjectShellArr_Impl / SfxViewFrameArr_Impl / SfxViewShellArr_Impl
and the following 4 with typedefs of boost::ptr_vector:
 SfxChildWinFactArr_Impl / SfxMenuCtrlFactArr_Impl /
 SfxStbCtrlFactArr_Impl / SfxTbxCtrlFactArr_Impl

Change-Id: I1754bd19ec418a3e7ba5c47fb6d8568e8fca9b29
Reviewed-on: https://gerrit.libreoffice.org/10891
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 0a11a06..ca22000 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -35,7 +35,12 @@
 // header file because in former times SfxApplication was derived from it
 #include 
 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
 #include 
 
 class Timer;
@@ -51,32 +56,31 @@ class AppSettings;
 struct SfxChildWinContextFactory;
 class SfxAppData_Impl;
 class SfxBindings;
-class SfxChildWinFactArr_Impl;
+typedef boost::ptr_vector SfxChildWinFactArr_Impl;
 class SfxChildWindow;
 class SfxDispatcher;
 class SfxEventConfiguration;
 class SfxEventHint;
 class SfxItemSet;
 class SfxMedium;
-class SfxMenuCtrlFactArr_Impl;
+typedef boost::ptr_vector SfxMenuCtrlFactArr_Impl;
 class SfxNewFileDialog;
 class SfxObjectShell;
-class SfxObjectShellArr_Impl;
+typedef ::std::vector SfxObjectShellArr_Impl;
 class SfxProgress;
 class SfxSlotPool;
-class SfxStbCtrlFactArr_Impl;
-class SfxTbxCtrlFactArr_Impl;
+typedef boost::ptr_vector SfxStbCtrlFactArr_Impl;
+typedef boost::ptr_vector SfxTbxCtrlFactArr_Impl;
 class SfxTemplateDialog;
 class SfxViewFrame;
-class SfxViewFrameArr_Impl;
+typedef ::std::vector SfxViewFrameArr_Impl;
 class SfxViewShell;
-class SfxViewShellArr_Impl;
+typedef ::std::vector SfxViewShellArr_Impl;
 class StarBASIC;
 class SfxWorkWindow;
 class SfxFilterMatcher;
 class SfxModule;
 class SfxModule;
-typedef ::std::vector SfxModuleArr_Impl;
 class Window;
 struct SfxChildWinFactory;
 struct SfxMenuCtrlFactory;
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 9dbfbad..cf9130f 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -21,6 +21,7 @@
 #define _SFXMOD_HXX // external
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,10 +45,6 @@ struct SfxChildWinFactory;
 struct SfxMenuCtrlFactory;
 struct SfxStbCtrlFactory;
 struct SfxTbxCtrlFactory;
-class SfxTbxCtrlFactArr_Impl;
-class SfxChildWinFactArr_Impl;
-class SfxMenuCtrlFactArr_Impl;
-class SfxStbCtrlFactArr_Impl;
 class SfxTabPage;
 class Window;
 
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
index 1ce03bc..31cd354 100644
--- a/sfx2/inc/arrdecl.hxx
+++ b/sfx2/inc/arrdecl.hxx
@@ -21,47 +21,6 @@
 
 #include 
 
-class SfxObjectShell;
-class SfxObjectShellArr_Impl : public std::vector {};
-
-class SfxViewFrame;
-class SfxViewFrameArr_Impl : public std::vector {};
-
-class SfxViewShell;
-class SfxViewShellArr_Impl : public std::vector {};
-
-struct SfxTbxCtrlFactory;
-class SfxTbxCtrlFactArr_Impl : public std::vector
-{
-public:
-// de-allocates child objects
-~SfxTbxCtrlFactArr_Impl();
-};
-
-struct SfxStbCtrlFactory;
-class SfxStbCtrlFactArr_Impl : public std::vector
-{
-public:
-// de-allocates child objects
-~SfxStbCtrlFactArr_Impl();
-};
-
-struct SfxMenuCtrlFactory;
-class SfxMenuCtrlFactArr_Impl : public std::vector
-{
-public:
-// de-allocates child objects
-~SfxMenuCtrlFactArr_Impl();
-};
-
-struct SfxChildWinFactory;
-class SfxChildWinFactArr_Impl : public std::vector
-{
-public:
-// de-allocates child objects
-~SfxChildWinFactArr_Impl();
-};
-
 class SfxModule;
 typedef ::std::vector SfxModuleArr_Impl;
 
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index 1ab79aa..43ff5f1 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -25,7 +25,6 @@
 #include "appdata.hxx"
 #include "workwin.hxx"
 #include 
-#include "arrdecl.hxx"
 #include 
 #include 
 #include 
@@ -50,7 +49,7 @@ void SfxApplication::RegisterChild

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

2014-03-25 Thread Mathias Supp
 include/sfx2/sfxsids.hrc   |3 ++-
 sfx2/sdi/sfx.sdi   |5 +
 sw/source/core/uibase/uiview/view2.cxx |7 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 450cb7831f077df43582de15631de3886888e9e0
Author: Mathias Supp 
Date:   Tue Feb 25 04:04:48 2014 +0100

add parameter to supress dialog

With the new parameter you can now supress the dialog for document
compare in writer.

Change-Id: I984ee75552e5c006332331510df5d437b687903f

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index b8bef21..ebac7de 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -264,6 +264,7 @@
 #define SID_MAIL_SENDDOCASFORMAT(SID_SFX_START + 1707)
 #define SID_MAIL_SENDDOCASMS(SID_SFX_START + 1708)
 #define SID_MAIL_SENDDOCASOOO   (SID_SFX_START + 1709)
+#define SID_NO_ACCEPT_DIALOG(SID_SFX_START + 1710)
 #define SID_NOAUTOSAVE  (SID_SFX_START + 1711)
 #define SID_PRINT_SELECTEDSHEET (SID_SFX_START + 1712)
 #define SID_OPTIONS_PAGEURL (SID_SFX_START + 1713)
@@ -285,6 +286,7 @@
 //  SID_SFX_free_START  (SID_SFX_START + 1728)
 //  SID_SFX_free_END(SID_SFX_START + 3999)
 
+
 #define SID_OPEN_NEW_VIEW   (SID_SFX_START + 520)
 // FREE, was SID_VIEW_ZOOM_MODE
 // FREE, was SID_VIEW_POS_SIZE
@@ -753,7 +755,6 @@
 #define SC_VIEW_START   (SID_SC_START)
 #endif
 #define FID_CHG_RECORD  (EDIT_MENU_START + 18)
-//see sc/inc/sc.hrc for the rest of the SC_VIEW_START entries
 #define SID_CHG_PROTECT (SC_VIEW_START + 84)
 
 // eof 
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index bba571c..59e6254 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -1071,7 +1071,7 @@ SfxStringItem Comments SID_DOCINFO_COMMENTS
 
 
 SfxInt32Item CompareDocuments SID_DOCUMENT_COMPARE
-(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions 
SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION)
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions 
SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION, SfxBoolItem 
NoAcceptDialog SID_NO_ACCEPT_DIALOG)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -4302,9 +4302,6 @@ SfxObjectItem Open SID_OPENDOC
 RecordPerSet;
 Asynchron;
 
-/* status: */
-SlotType = SfxStringItem
-
 /* config: */
 AccelConfig = TRUE,
 MenuConfig = TRUE,
diff --git a/sw/source/core/uibase/uiview/view2.cxx 
b/sw/source/core/uibase/uiview/view2.cxx
index b7d865e..52212a3 100644
--- a/sw/source/core/uibase/uiview/view2.cxx
+++ b/sw/source/core/uibase/uiview/view2.cxx
@@ -732,6 +732,7 @@ void SwView::Execute(SfxRequest &rReq)
 sal_Int16 nVersion = 0;
 bool bHasFileName = false;
 m_pViewImpl->SetParam( 0 );
+bool bNoAcceptDialog = false;
 
 if( pArgs )
 {
@@ -747,6 +748,10 @@ void SwView::Execute(SfxRequest &rReq)
 nVersion = ((const SfxInt16Item *)pItem)->GetValue();
 m_pViewImpl->SetParam( nVersion );
 }
+if( SFX_ITEM_SET == pArgs->GetItemState( 
SID_NO_ACCEPT_DIALOG, sal_False, &pItem ))
+{
+bNoAcceptDialog = ((const SfxBoolItem 
*)pItem)->GetValue();
+}
 }
 
 m_pViewImpl->InitRequest( rReq );
@@ -756,7 +761,7 @@ void SwView::Execute(SfxRequest &rReq)
 {
 rReq.SetReturnValue( SfxInt32Item( nSlot, nFound ));
 
-if (nFound > 0) // show Redline browser
+if (nFound > 0 && !bNoAcceptDialog) // show Redline browser
 {
 SfxViewFrame* pVFrame = GetViewFrame();
 pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-04 Thread Caolán McNamara
 include/sfx2/childwin.hxx|2 +-
 sc/source/ui/app/scdll.cxx   |3 +--
 sfx2/source/appl/workwin.cxx |3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit ca479763afc33824abc7afeaf41a5de1010ac777
Author: Caolán McNamara 
Date:   Fri Apr 4 14:01:43 2014 +0100

I can't see that the bVisible as 42 is any difference from 'true'

...in practise. If I'm wrong then this needs to be a TriState

Change-Id: I4aa499c89ce2f1a46edf443db053b264f285b0d5

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 03fa2c6..8e2827b 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -50,7 +50,7 @@ class SfxChildWindowContext;
 // ChildWindow Configuration
 struct SfxChildWinInfo
 {
-sal_BoolbVisible; // this can be sal_True, or sal_False, or 42
+boolbVisible;
 Point   aPos;
 SizeaSize;
 sal_uInt16  nFlags;
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 755839a..4a7f182 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -248,8 +248,7 @@ void ScDLL::Init()
 
 //  Child-Windows
 
-// Hack: register input line with 42 so it is always visible in the PlugIn
-ScInputWindowWrapper::RegisterChildWindow(42, pMod, 
SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
+ScInputWindowWrapper::RegisterChildWindow(true, pMod, 
SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
 ScNavigatorDialogWrapper
::RegisterChildWindowContext(static_cast(ScTabViewShell::GetInterfaceId()),
 pMod);
 ScSolverDlgWrapper  ::RegisterChildWindow(false, pMod);
 ScOptSolverDlgWrapper   ::RegisterChildWindow(false, pMod);
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 8eec8bcb..a8b8973 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1514,8 +1514,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
 
 void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, sal_Bool 
bSetFocus )
 {
-if ( pCW->aInfo.bVisible != 42 )
-pCW->aInfo.bVisible = sal_True;
+pCW->aInfo.bVisible = true;
 
 SfxChildWindow *pChildWin = SfxChildWindow::CreateChildWindow( pCW->nId, 
pWorkWin, &GetBindings(), pCW->aInfo);
 if (pChildWin)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-08 Thread Stephan Bergmann
 include/sfx2/app.hxx   |2 
 include/unotools/securityoptions.hxx   |   21 +-
 sfx2/source/appl/appcfg.cxx|6 -
 sfx2/source/appl/appopen.cxx   |   27 ++--
 unotools/source/config/securityoptions.cxx |   89 ++---
 5 files changed, 46 insertions(+), 99 deletions(-)

New commits:
commit ea1a7ba72e1bd50a12faff1f8180a5a44745715d
Author: Stephan Bergmann 
Date:   Fri Nov 8 17:25:45 2013 +0100

Clean up IsSecureURL

...to not use WildCard (in case a trusted location URI already contains an
unescaped "*"), be specific about matching only past a final "/", and 
rename to
isSecureMacroUri for clarification.

The check with an INET_PROT_NOT_VALID default INetURLObject in
SfxApplication::OpenDocExec_Impl ("we have to check the referer before
executing") had efficiently been dead since its inception in
14237ac4bf497decdde8b742acea23780833ba12 "#90880#: security checks 
corrected,"
as INET_PROT_NOT_VALID is considered secure regardless of referer anyway.

Change-Id: I03bca5e6dac89bb2aac52909aff273ea640228d8

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index d28a373..ebb280a 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -79,7 +79,6 @@ class SfxModule;
 class SfxModule;
 typedef ::std::vector SfxModuleArr_Impl;
 class Window;
-class INetURLObject;
 struct SfxChildWinFactory;
 struct SfxMenuCtrlFactory;
 struct SfxStbCtrlFactory;
@@ -203,7 +202,6 @@ public:
 virtual voidInvalidate(sal_uInt16 nId = 0);
 voidNotifyEvent(const SfxEventHint& rEvent, bool 
bSynchron = true );
 sal_BoolIsDowning() const;
-sal_BoolIsSecureURL( const INetURLObject &rURL, 
const OUString *pReferer ) const;
 voidResetLastDir();
 
 SAL_DLLPRIVATE static SfxApplication* Get() { return pApp;}
diff --git a/include/unotools/securityoptions.hxx 
b/include/unotools/securityoptions.hxx
index eb64647..fc6c49c 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -181,21 +181,12 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED 
SvtSecurityOptions : public utl::detail
 
 sal_BoolIsMacroDisabled (   ) 
const ;
 
-
/*-//**
-@short  special method to check an URL and his referer 
corresponding to ouer internal security cessation
-@descr  Give us an URL and his referer and we will say you if 
these url can be scripted or not!
-
-@seealso-
-
-@param  "sURL" reference to URL for checking
-@param  "sReferer" reference to referer which wish to run 
script by given URL
-@return sal_True if URL is secure or security is obsolete(!) 
or sal_False otherwise.
-
-@onerrorNo error should occur!
-
*//*-*/
-
-sal_Bool IsSecureURL(   const   OUString&sURL,
-const   OUString&sReferer) const ;
+/**
+   Check whether the given uri is either no dangerous macro-execution
+   URI at all or else the given referer is a trusted source.
+*/
+bool isSecureMacroUri(OUString const & uri, OUString const & referer)
+const;
 
 ::com::sun::star::uno::Sequence< Certificate >  GetTrustedAuthors  
 (   ) const ;
 voidSetTrustedAuthors  
 ( const ::com::sun::star::uno::Sequence< Certificate >& rAuthors)   ;
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index be93509..1847648 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -494,12 +494,6 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
 return bRet;
 }
 
-//
-sal_Bool SfxApplication::IsSecureURL( const INetURLObject& rURL, const 
OUString* pReferer ) const
-{
-return SvtSecurityOptions().IsSecureURL( rURL.GetMainURL( 
INetURLObject::NO_DECODE ), *pReferer );
-}
-//
 // TODO/CLEANUP: Why two SetOptions Methods?
 void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
 {
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 1112573..e376929 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -931,28 +931,17 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
 if ( !bFound )
 {
  

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

2013-11-12 Thread Manal Alhassoun
 include/sfx2/newstyle.hxx   |8 +-
 sfx2/UIConfig_sfx.mk|1 
 sfx2/source/dialog/newstyle.cxx |   24 +++-
 sfx2/source/dialog/newstyle.hrc |4 -
 sfx2/source/dialog/newstyle.src |   36 
 sfx2/uiconfig/ui/newstyle.ui|  120 
 6 files changed, 135 insertions(+), 58 deletions(-)

New commits:
commit eb505c259d0d7bd05d1bb5be5a14ad8613c2a9c7
Author: Manal Alhassoun 
Date:   Thu Nov 7 15:12:10 2013 +0300

Convert New Style dialog to widget UI

Change-Id: Idaea69f674e1e84e3e1e649006c2d92176897fe0
Reviewed-on: https://gerrit.libreoffice.org/6607
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index 9584396..368d154 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -33,10 +33,8 @@ class SfxStyleSheetBasePool;
 class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog
 {
 private:
-FixedLine   aColFL;
-ComboBoxaColBox;
-OKButtonaOKBtn;
-CancelButtonaCancelBtn;
+ComboBox* m_pColBox;
+OKButton* m_pOKBtn;
 
 QueryBoxaQueryOverwriteBox;
 SfxStyleSheetBasePool&  rPool;
@@ -48,7 +46,7 @@ public:
 SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& );
 ~SfxNewStyleDlg();
 
-OUStringGetName() const { return 
comphelper::string::stripStart(aColBox.GetText(), ' '); }
+OUStringGetName() const { return 
comphelper::string::stripStart(m_pColBox->GetText(), ' '); }
 };
 
 #endif
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index a2629d2..1ae9091 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/managestylepage \
+   sfx2/uiconfig/ui/newstyle \
sfx2/uiconfig/ui/optprintpage \
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/printeroptionsdialog \
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 2995a71..5f8e24e 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -31,7 +31,7 @@
 IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
 {
 (void)pControl; //unused
-const OUString aName( aColBox.GetText() );
+const OUString aName( m_pColBox->GetText() );
 SfxStyleSheetBase* pStyle = rPool.Find( aName, rPool.GetSearchFamily(), 
SFXSTYLEBIT_ALL );
 if ( pStyle )
 {
@@ -54,7 +54,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
 
 IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
 {
-aOKBtn.Enable( !comphelper::string::remove(pBox->GetText(), ' ').isEmpty() 
);
+m_pOKBtn->Enable( !comphelper::string::remove(pBox->GetText(), ' 
').isEmpty() );
 return 0;
 }
 IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
@@ -63,28 +63,26 @@ IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox 
*, pBox )
 
 SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& 
rInPool ) :
 
-ModalDialog( pParent, SfxResId( DLG_NEW_STYLE_BY_EXAMPLE ) ),
+ModalDialog( pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui" ),
 
-aColFL  ( this, SfxResId( FL_COL ) ),
-aColBox ( this, SfxResId( LB_COL ) ),
-aOKBtn  ( this, SfxResId( BT_OK ) ),
-aCancelBtn  ( this, SfxResId( BT_CANCEL ) ),
 aQueryOverwriteBox  ( this, SfxResId( MSG_OVERWRITE ) ),
 
 rPool( rInPool )
 
 {
-FreeResource();
+get(m_pColBox, "stylename");
+m_pColBox->set_width_request(m_pColBox->approximate_char_width() * 25);
+m_pColBox->set_height_request(m_pColBox->GetTextHeight() * 10);
+get(m_pOKBtn, "ok");
 
-aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
-aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
-aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
-//aColBox.SetAccessibleName(SfxResId(FL_COL).toString());
+m_pOKBtn->SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+m_pColBox->SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
+m_pColBox->SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
 
 SfxStyleSheetBase *pStyle = rPool.First();
 while ( pStyle )
 {
-aColBox.InsertEntry(pStyle->GetName());
+m_pColBox->InsertEntry(pStyle->GetName());
 pStyle = rPool.Next();
 }
 }
diff --git a/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc
index 0262c89..4725dbd 100644
--- a/sfx2/source/dialog/newstyle.hrc
+++ b/sfx2/source/dialog/newstyle.hrc
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define BT_OK   100
-#define BT_CANCEL   101
-#define LB_COL  1
-#define FL_COL  2
 #defi

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

2014-01-13 Thread Stephan Bergmann
 include/sfx2/sfx.hrc|2 --
 sfx2/source/doc/objxtor.cxx |4 
 svx/source/form/fmshell.cxx |3 ---
 sw/source/ui/app/docsh2.cxx |2 +-
 4 files changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 46f48148d3569153ef20f90df3f0ea9e95944565
Author: Stephan Bergmann 
Date:   Tue Jan 14 08:23:52 2014 +0100

RET_NEWTASK is apparently unused (since around 2000)

Change-Id: I3c0804d35c5ff7a00ec7169d0ab387f4b63d65d3

diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 7135148..6529c5a 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -287,8 +287,6 @@
 
 #define HID_INTERFACE_SFXHELP_VIEWSH24
 
-#define RET_NEWTASK 200
-
 #endif // #ifndef _SFX_HRC
 
 // *** EOF
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index befa7ae..3a02be1 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -651,10 +651,6 @@ sal_uInt16 SfxObjectShell::PrepareClose
 else if ( RET_CANCEL == nRet )
 // Cancelled
 return sal_False;
-else if ( RET_NEWTASK == nRet )
-{
-return RET_NEWTASK;
-}
 }
 
 pImp->bPreparedForClose = sal_True;
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 30b0a23..c897ed5 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -287,9 +287,6 @@ sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool 
/*bForBrowsing*/)
 
 case RET_CANCEL:
 return sal_False;
-
-case RET_NEWTASK:
-return RET_NEWTASK;
 }
 
 if ( bModified )
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 99544d2..6ae5687 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -307,7 +307,7 @@ sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool 
bForBrowsing )
 {
 sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
 
-if( sal_True == nRet ) //has to be queried against TRUE! (RET_NEWTASK)
+if( sal_True == nRet )
 EndListening( *this );
 
 if( pDoc && IsInPrepareClose() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-19 Thread Kohei Yoshida
 include/sfx2/sfxbasecontroller.hxx   |9 ++-
 include/sfx2/viewsh.hxx  |7 ++
 sc/inc/document.hxx  |3 +
 sc/source/core/data/documen5.cxx |   47 ++-
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |1 
 sc/source/ui/app/client.cxx  |1 
 sc/source/ui/app/inputhdl.cxx|1 
 sc/source/ui/app/transobj.cxx|1 
 sc/source/ui/drawfunc/drawsh.cxx |1 
 sc/source/ui/drawfunc/drawsh2.cxx|1 
 sc/source/ui/drawfunc/drtxtob.cxx|1 
 sc/source/ui/drawfunc/drtxtob1.cxx   |1 
 sc/source/ui/inc/tabview.hxx |2 
 sc/source/ui/inc/tabvwsh.hxx |4 +
 sc/source/ui/inc/viewdata.hxx|3 -
 sc/source/ui/undo/undoblk.cxx|1 
 sc/source/ui/vba/excelvbahelper.cxx  |1 
 sc/source/ui/view/cellsh.cxx |1 
 sc/source/ui/view/cellsh1.cxx|1 
 sc/source/ui/view/cliputil.cxx   |1 
 sc/source/ui/view/drawvie4.cxx   |1 
 sc/source/ui/view/editsh.cxx |1 
 sc/source/ui/view/select.cxx |1 
 sc/source/ui/view/spelldialog.cxx|1 
 sc/source/ui/view/tabcont.cxx|1 
 sc/source/ui/view/tabview.cxx|2 
 sc/source/ui/view/tabvwsh2.cxx   |1 
 sc/source/ui/view/tabvwsh4.cxx   |   27 ++
 sc/source/ui/view/tabvwshb.cxx   |6 ++
 sc/source/ui/view/tabvwshd.cxx   |1 
 sc/source/ui/view/tabvwshe.cxx   |1 
 sc/source/ui/view/tabvwshg.cxx   |1 
 sc/source/ui/view/viewdata.cxx   |3 -
 sc/source/ui/view/viewfun3.cxx   |1 
 sc/source/ui/view/viewfun4.cxx   |1 
 sc/source/ui/view/viewfun7.cxx   |1 
 sfx2/source/view/frmload.cxx |   13 -
 sfx2/source/view/sfxbasecontroller.cxx   |6 ++
 sfx2/source/view/viewsh.cxx  |5 +-
 39 files changed, 143 insertions(+), 19 deletions(-)

New commits:
commit 2fc4f5cd750cc3899ffc6b2f831edcb01e7773b4
Author: Kohei Yoshida 
Date:   Mon May 19 16:00:39 2014 -0400

Register OpenGL windows to ScGridWindow upon file load.

Change-Id: I6fdce232ef41079f20a983dc72da032196078858

diff --git a/include/sfx2/sfxbasecontroller.hxx 
b/include/sfx2/sfxbasecontroller.hxx
index cff3417..5389d8f 100644
--- a/include/sfx2/sfxbasecontroller.hxx
+++ b/include/sfx2/sfxbasecontroller.hxx
@@ -35,7 +35,8 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -60,7 +61,7 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID );
 //  class declarations
 
 
-typedef ::cppu::WeakImplHelper9 <   css::frame::XController2
+typedef ::cppu::WeakImplHelper10 <   css::frame::XController2
 ,   css::frame::XControllerBorder
 ,   css::frame::XDispatchProvider
 ,   css::task::XStatusIndicatorSupplier
@@ -69,6 +70,7 @@ typedef ::cppu::WeakImplHelper9 <   css::frame::XController2
 ,   css::frame::XDispatchInformationProvider
 ,   css::frame::XTitle
 ,   css::frame::XTitleChangeBroadcaster
+,   css::lang::XInitialization
 >   SfxBaseController_Base;
 
 class SFX2_DLLPUBLIC SfxBaseController  :public SfxBaseController_Base
@@ -166,6 +168,9 @@ public:
 virtual void SAL_CALL addTitleChangeListener( const css::uno::Reference< 
css::frame::XTitleChangeListener >& xListener ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL removeTitleChangeListener( const 
css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
+// css::lang::XInitialization
+virtual void SAL_CALL initialize( const ::css::uno::Sequence< 
::css::uno::Any >& aArguments ) SAL_OVERRIDE;
+
 // FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
 // either the _Impl name should vanish or there should be an "official" API
 SfxViewShell* GetViewShell_Impl() const;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 13eb515..7c43c93 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -190,6 +190,13 @@ public:
 voidVisAreaChan

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

2014-04-02 Thread Caolán McNamara
 include/sfx2/tabdlg.hxx   |1 -
 include/vcl/tabpage.hxx   |2 ++
 sfx2/source/dialog/tabdlg.cxx |   35 ---
 vcl/source/window/tabpage.cxx |8 
 4 files changed, 38 insertions(+), 8 deletions(-)

New commits:
commit 6fa98a08f2f4b57b660fc39542a9ceb20779d769
Author: Caolán McNamara 
Date:   Wed Apr 2 16:15:59 2014 +0100

Related: fdo#75307 use the unique auto help id to identify tabpages

and dialogs that are loaded from the .ui format

Change-Id: Id8abff6d89818ca7384d9691a05eacd378a5905c

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 4bc1138..54baa7a 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -91,7 +91,6 @@ friend class SfxTabDialogController;
 SfxItemSet* pOutSet;
 TabDlg_Impl*pImpl;
 sal_uInt16* pRanges;
-sal_uInt32  nResId;
 sal_uInt16  nAppPageId;
 boolbItemsReset;
 sal_BoolbFmt; // sal_True, sal_False or 2(some kind of hack)
diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index a8ac279..88a1ead 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -53,6 +53,8 @@ public:
 virtual voidActivatePage();
 virtual voidDeactivatePage();
 
+OString GetConfigId() const;
+
 //To-Do, consider inheriting from VclContainer
 virtual voidSetPosSizePixel(const Point& rNewPos, const Size& 
rNewSize) SAL_OVERRIDE;
 virtual voidSetPosPixel(const Point& rNewPos) SAL_OVERRIDE;
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index d12b5c4..853c806 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -405,7 +405,6 @@ SfxTabDialog::SfxTabDialog
 , pSet(pItemSet)
 , pOutSet(0)
 , pRanges(0)
-, nResId(0)
 , nAppPageId(USHRT_MAX)
 , bItemsReset(false)
 , bFmt(bEditFmt)
@@ -436,7 +435,6 @@ SfxTabDialog::SfxTabDialog
 , pSet(pItemSet)
 , pOutSet(0)
 , pRanges(0)
-, nResId(0)
 , nAppPageId(USHRT_MAX)
 , bItemsReset(false)
 , bFmt(bEditFmt)
@@ -464,7 +462,15 @@ SfxTabDialog::~SfxTabDialog()
 if ( !aPageData.isEmpty() )
 {
 // save settings of all pages (user data)
-SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( 
pDataObject->nId ) );
+OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(),
+RTL_TEXTENCODING_UTF8);
+if (sConfigId.isEmpty())
+{
+SAL_WARN("sfx.config", "Tabpage needs to be converted to 
.ui format");
+sConfigId = OUString::number(pDataObject->nId);
+}
+
+SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
 aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( 
aPageData ) ) );
 }
 
@@ -685,7 +691,7 @@ void SfxTabDialog::Start_Impl()
 sal_uInt16 nActPage = m_pTabCtrl->GetPageId( 0 );
 
 // load old settings, when exists
-SvtViewOptions aDlgOpt( E_TABDIALOG, OUString::number( nResId ) );
+SvtViewOptions aDlgOpt(E_TABDIALOG, 
OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
 if ( aDlgOpt.Exists() )
 {
 SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), 
RTL_TEXTENCODING_ASCII_US));
@@ -806,7 +812,15 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
 if ( !aPageData.isEmpty() )
 {
 // save settings of this page (user data)
-SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( 
pDataObject->nId ) );
+OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(),
+RTL_TEXTENCODING_UTF8);
+if (sConfigId.isEmpty())
+{
+SAL_WARN("sfx.config", "Tabpage needs to be converted to 
.ui format");
+sConfigId = OUString::number(pDataObject->nId);
+}
+
+SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
 aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( 
aPageData ) ) );
 }
 
@@ -882,8 +896,9 @@ SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) 
const
 void SfxTabDialog::SavePosAndId()
 {
 // save settings (screen position and current page)
-SvtViewOptions aDlgOpt( E_TABDIALOG, OUString::number( nResId ) );
+SvtViewOptions aDlgOpt(E_TABDIALOG, 
OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
 
aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WINDOWSTATE_MASK_POS),RTL_TEXTENCODING_ASCII_US));
+// to-do replace with name of page when all pages are converted to .ui
 aDlgOpt.SetPageID( m_pTabCtrl->GetCurPageId() );
 }
 
@@ -1252,7 +1267,13 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, 
pTabCtrl )
 DBG_ASSERT( NULL == pDataObje

[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sc/uiconfig sd/uiconfig sw/uiconfig

2013-07-25 Thread Cor Nouws
 include/sfx2/sfxcommands.h   |1 +
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 
+
 sc/uiconfig/scalc/menubar/menubar.xml|8 
+++-
 sd/uiconfig/sdraw/menubar/menubar.xml|8 
+++-
 sd/uiconfig/simpress/menubar/menubar.xml |8 
+++-
 sw/uiconfig/sglobal/menubar/menubar.xml  |8 
+++-
 sw/uiconfig/sweb/menubar/menubar.xml |8 
+++-
 sw/uiconfig/swform/menubar/menubar.xml   |8 
+++-
 sw/uiconfig/swreport/menubar/menubar.xml |8 
+++-
 sw/uiconfig/swriter/menubar/menubar.xml  |8 
+++-
 sw/uiconfig/swxform/menubar/menubar.xml  |8 
+++-
 11 files changed, 69 insertions(+), 9 deletions(-)

New commits:
commit 12a034623e015ca05b56c82ebb63230ce731bab4
Author: Cor Nouws 
Date:   Fri Jun 14 17:35:25 2013 +0200

fdo#59427 first step for template menu

takes care for File > Template > Save and File > Template > Manage
however the menu for the latter comes from uno:NewDoc and thus has
to be changed > TODO

Change-Id: I0600847724fc5ccb3ef13d57355d8eb54970cc9b
Reviewed-on: https://gerrit.libreoffice.org/4284
Reviewed-by: Noel Power 
Tested-by: Noel Power 

diff --git a/include/sfx2/sfxcommands.h b/include/sfx2/sfxcommands.h
index 78cbd7a..4d4a9d3 100644
--- a/include/sfx2/sfxcommands.h
+++ b/include/sfx2/sfxcommands.h
@@ -50,6 +50,7 @@
 #define CMD_SID_CHECKIN ".uno:CheckIn"
 #define CMD_SID_OPENURL ".uno:OpenUrl"
 #define CMD_SID_OPTIONS ".uno:Options"
+#define CMD_SID_TEMPLATE_MENU   ".uno:TemplateMenu"
 #define CMD_SID_ORGANIZER   ".uno:Organizer"
 #define CMD_SID_PASTE   ".uno:Paste"
 #define CMD_SID_PASTE_SPECIAL   ".uno:PasteSpecial"
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 241e43e..809cee0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -5594,6 +5594,11 @@
   Template Manager
 
   
+  
+
+  ~Templates
+
+  
   
 
   Edit with External Tool
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml 
b/sc/uiconfig/scalc/menubar/menubar.xml
index b217702..a45cf12 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -25,10 +25,16 @@
 
 
 
+
+
+
+
+
+
+
 
 
 
-
 
 
 
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml 
b/sd/uiconfig/sdraw/menubar/menubar.xml
index 0f2d312..c3021faf 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -25,10 +25,16 @@
   
   
   
+
+
+
+
+
+
+  
   
   
   
-  
   
   
   
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml 
b/sd/uiconfig/simpress/menubar/menubar.xml
index 9ad2019..2fd3032 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -25,10 +25,16 @@
 
 
 
+
+
+
+
+
+
+
 
 
 
-
 
 
 
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml 
b/sw/uiconfig/sglobal/menubar/menubar.xml
index 3c310f2..a72d86f 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -25,10 +25,16 @@
   
   
   
+  
+  
+  
+  
+  
+  
+  
   
   
   
-  
   
   
   
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml 
b/sw/uiconfig/sweb/menubar/menubar.xml
index 30229a7..3bec1a9 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -25,10 +25,16 @@
   
   
   
+  
+  
+  
+  
+  
+  
+  
   
   
   
-  
   
   
   
diff --git a/sw/uiconfig/swform/menubar/menubar.xml 
b/sw/uiconfig/swform/menubar/menubar.xml
index 4f

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

2014-01-15 Thread Stephan Bergmann
 include/sfx2/objsh.hxx   |2 +-
 include/sfx2/viewfrm.hxx |2 +-
 sc/source/ui/docshell/docsh4.cxx |   16 +++-
 sc/source/ui/inc/docsh.hxx   |2 +-
 sfx2/source/appl/appdde.cxx  |   14 +++---
 sw/inc/docsh.hxx |2 +-
 sw/source/ui/app/docsh2.cxx  |2 +-
 7 files changed, 19 insertions(+), 21 deletions(-)

New commits:
commit c72a7a63833f840fdb334d91fc81a77c17f128a6
Author: Stephan Bergmann 
Date:   Wed Jan 15 13:58:41 2014 +0100

DdeGetData should apparently return bool

Change-Id: I603198b9fd2c6fea1c9ec7de09b23c61fe9d603c

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index c38ed8f..d2c0fe3 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -479,7 +479,7 @@ public:
 
 // DDE-Interface
 virtual longDdeExecute( const OUString& rCmd );
-virtual longDdeGetData( const OUString& rItem,
+virtual boolDdeGetData( const OUString& rItem,
 const OUString& rMimeType,
 ::com::sun::star::uno::Any & 
rValue );
 virtual longDdeSetData( const OUString& rItem,
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 8c245ab..9628eb8 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -140,7 +140,7 @@ public:
 
 // DDE-Interface
 virtual longDdeExecute( const OUString& rCmd );
-virtual longDdeGetData( const OUString& rItem,
+virtual boolDdeGetData( const OUString& rItem,
 const OUString& rMimeType,
 ::com::sun::star::uno::Any & rValue );
 virtual longDdeSetData( const OUString& rItem,
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7819fc2..cb82e6a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2077,7 +2077,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const 
SfxItemSet* pStyleSet,
 rbFooter = ((const SfxBoolItem&)pSet->Get(ATTR_PAGE_ON)).GetValue();
 }
 
-long ScDocShell::DdeGetData( const OUString& rItem,
+bool ScDocShell::DdeGetData( const OUString& rItem,
  const OUString& rMimeType,
  ::com::sun::star::uno::Any & rValue )
 {
@@ -2090,11 +2090,11 @@ long ScDocShell::DdeGetData( const OUString& rItem,
 rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
 (const sal_Int8*)aFmtByte.getStr(),
 aFmtByte.getLength() + 1 );
-return 1;
+return true;
 }
 ScImportExport aObj( &aDocument, rItem );
 if ( !aObj.IsRef() )
-return 0;   // ungueltiger Bereich
+return false;   // ungueltiger Bereich
 
 if( aDdeTextFmt[0] == 'F' )
 aObj.SetFormulas( sal_True );
@@ -2108,23 +2108,21 @@ long ScDocShell::DdeGetData( const OUString& rItem,
 rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
 (const sal_Int8*)aData.getStr(),
 aData.getLength() + 1 );
-return 1;
+return true;
 }
 else
-return 0;
+return false;
 }
 if( aDdeTextFmt == "CSV" ||
 aDdeTextFmt == "FCSV" )
 aObj.SetSeparator( ',' );
 aObj.SetExportTextOptions( ScExportTextOptions( 
ScExportTextOptions::ToSpace, 0, false ) );
-return aObj.ExportData( rMimeType, rValue ) ? 1 : 0;
+return aObj.ExportData( rMimeType, rValue );
 }
 
 ScImportExport aObj( &aDocument, rItem );
 aObj.SetExportTextOptions( ScExportTextOptions( 
ScExportTextOptions::ToSpace, 0, false ) );
-if( aObj.IsRef() )
-return aObj.ExportData( rMimeType, rValue ) ? 1 : 0;
-return 0;
+return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
 }
 
 long ScDocShell::DdeSetData( const OUString& rItem,
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 6bfee71..c521ee9 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -374,7 +374,7 @@ public:
bool& rbHeader,
bool& rbFooter );
 
-virtual long DdeGetData( const OUString& rItem, const OUString& rMimeType,
+virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType,
 ::com::sun::star::uno::Any & rValue );
 virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType,
 const ::com:

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

2014-01-15 Thread Stephan Bergmann
 include/sfx2/objsh.hxx   |2 +-
 include/sfx2/viewfrm.hxx |2 +-
 sc/source/ui/docshell/docsh4.cxx |   16 +++-
 sc/source/ui/inc/docsh.hxx   |2 +-
 sfx2/source/appl/appdde.cxx  |   14 +++---
 sw/inc/docsh.hxx |2 +-
 sw/source/ui/app/docsh2.cxx  |2 +-
 7 files changed, 19 insertions(+), 21 deletions(-)

New commits:
commit bf535c47728aa874dd9f0d7fba6ba478adb26073
Author: Stephan Bergmann 
Date:   Wed Jan 15 15:11:53 2014 +0100

DdeSetData should apparently return bool

Change-Id: Ie0e66ac6c76eabb80340d4c11b60dd7890c6a378

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index d2c0fe3..69b49a6 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -482,7 +482,7 @@ public:
 virtual boolDdeGetData( const OUString& rItem,
 const OUString& rMimeType,
 ::com::sun::star::uno::Any & 
rValue );
-virtual longDdeSetData( const OUString& rItem,
+virtual boolDdeSetData( const OUString& rItem,
 const OUString& rMimeType,
 const ::com::sun::star::uno::Any & 
rValue );
 virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem );
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 9628eb8..b771574 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -143,7 +143,7 @@ public:
 virtual boolDdeGetData( const OUString& rItem,
 const OUString& rMimeType,
 ::com::sun::star::uno::Any & rValue );
-virtual longDdeSetData( const OUString& rItem,
+virtual boolDdeSetData( const OUString& rItem,
 const OUString& rMimeType,
 const ::com::sun::star::uno::Any & 
rValue );
 virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index cb82e6a..eeb9e03 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2125,7 +2125,7 @@ bool ScDocShell::DdeGetData( const OUString& rItem,
 return aObj.IsRef() && aObj.ExportData( rMimeType, rValue );
 }
 
-long ScDocShell::DdeSetData( const OUString& rItem,
+bool ScDocShell::DdeSetData( const OUString& rItem,
  const OUString& rMimeType,
  const ::com::sun::star::uno::Any & rValue )
 {
@@ -2136,9 +2136,9 @@ long ScDocShell::DdeSetData( const OUString& rItem,
 if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, 
osl_getThreadTextEncoding() ) )
 {
 aDdeTextFmt = aDdeTextFmt.toAsciiUpperCase();
-return 1;
+return true;
 }
-return 0;
+return false;
 }
 ScImportExport aObj( &aDocument, rItem );
 if( aDdeTextFmt[0] == 'F' )
@@ -2149,19 +2149,17 @@ long ScDocShell::DdeSetData( const OUString& rItem,
 OUString aData;
 if ( ScByteSequenceToString::GetString( aData, rValue, 
osl_getThreadTextEncoding() ) )
 {
-return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 
0;
+return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK );
 }
-return 0;
+return false;
 }
 if( aDdeTextFmt == "CSV" ||
 aDdeTextFmt == "FCSV" )
 aObj.SetSeparator( ',' );
-return aObj.ImportData( rMimeType, rValue ) ? 1 : 0;
+return aObj.ImportData( rMimeType, rValue );
 }
 ScImportExport aObj( &aDocument, rItem );
-if( aObj.IsRef() )
-return aObj.ImportData( rMimeType, rValue ) ? 1 : 0;
-return 0;
+return aObj.IsRef() && aObj.ImportData( rMimeType, rValue );
 }
 
 ::sfx2::SvLinkSource* ScDocShell::DdeCreateLinkSource( const OUString& rItem )
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index c521ee9..5072f56 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -376,7 +376,7 @@ public:
 
 virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType,
 ::com::sun::star::uno::Any & rValue );
-virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType,
+virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType,
 const ::com::sun::star::uno::Any & rValue );
 virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem );
 
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 9785e36..e82cb17 100644
--- a/sfx2/source/ap

[Libreoffice-commits] core.git: include/sfx2 sc/source sd/source sfx2/source sw/source

2014-05-30 Thread Caolán McNamara
 include/sfx2/app.hxx|3 ---
 include/sfx2/templdlg.hxx   |   18 +-
 sc/source/ui/view/formatsh.cxx  |   17 +++--
 sd/source/ui/view/drviewsf.cxx  |   38 ++
 sd/source/ui/view/outlnvsh.cxx  |8 +---
 sd/source/ui/view/viewshe3.cxx  |   10 +++---
 sfx2/source/appl/appmisc.cxx|9 -
 sfx2/source/dialog/templdlg.cxx |   37 +++--
 sfx2/source/inc/templdgi.hxx|   15 ---
 sw/source/uibase/app/docst.cxx  |   11 ---
 10 files changed, 77 insertions(+), 89 deletions(-)

New commits:
commit 7a211e834fc271d3f28d7f8c49197c925242d862
Author: Caolán McNamara 
Date:   Fri May 30 11:09:59 2014 +0100

Resolves: fdo#79360 impress hangs on using sidebar new style

because those styles are "pseudo-styles" and a new one cannot be
added. The possibility is supposed to be disabled, and it is
disabled in the floating stylelist. The old code assumes there
can only be one of these stylelists and when a stylelist
queries if the "new" should be disabled the callback asks
the stylelist what family is selected, but only asks the floating one.

So, floating closed, sidebar open, the new is not disabled.
Implement the ancient TODO now that we have to. Instead of asking
the stylelist what family is selected, query the frame for what
is the current SID_STYLE_FAMILY as set by whatever is the active
stylelist.

What's disturbing is the SID_STYLE_FAMILY values are not SfxStyleFamily, but
indexes that have to be mapped to SfxStyleFamily. I bet there are a pile of
bugs around that, especially with little islands of different conversion
codesites

Change-Id: I85c8032d7c26ae6eea245685748f89b2a860e767

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 17b80b9..3f81077 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -174,9 +174,6 @@ public:
 SfxTemplateDialog*  GetTemplateDialog();
 Window* GetTopWindow() const;
 
-// TODO/CLEANUP: make currently selected family a view property and so we 
don't need to query the status from the "TemplateCommon"
-ISfxTemplateCommon* GetCurrentTemplateCommon( SfxBindings& );
-
 // members
 SfxFilterMatcher&   GetFilterMatcher();
 SfxProgress*GetProgress() const;
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index bc6cdc7..8c9f2f1 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -30,19 +30,7 @@
 
 class SfxTemplateDialog_Impl;
 
-// class ISfxTemplateCommon --
-
-class ISfxTemplateCommon
-{
-public:
-virtual SfxStyleFamily GetActualFamily() const = 0;
-
-protected:
-~ISfxTemplateCommon() {}
-};
-
 // class SfxTemplateDialog ---
-
 class SfxTemplateDialog : public SfxDockingWindow
 {
 private:
@@ -62,8 +50,12 @@ public:
 
 virtual voidUpdate();
 
-ISfxTemplateCommon* GetISfxTemplateCommon();
 voidSetParagraphFamily();
+
+// converts from SFX_STYLE_FAMILY Ids to 1-5
+static sal_uInt16 SFX2_DLLPUBLIC SfxFamilyIdToNId(SfxStyleFamily nFamily);
+// converts from 1-5 to SFX_STYLE_FAMILY Ids
+static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId);
 };
 
 // class SfxTemplateDialogWrapper 
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3522087..045ddf0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -212,9 +212,12 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
 
 case SID_STYLE_UPDATE_BY_EXAMPLE:
 {
-ISfxTemplateCommon* pDesigner = SFX_APP()->
-
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
-bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == 
pDesigner->GetActualFamily();
+SfxPoolItem* pItem = NULL;
+
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, 
pItem);
+SfxUInt16Item* pFamilyItem = 
dynamic_cast(pItem);
+
+bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == 
SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue());
+delete pItem;
 
 if ( bProtected || bPage )
 rSet.DisableItem( nSlotId );
@@ -226,9 +229,11 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
 case SID_STYLE_HIDE:
 case SID_STYLE_SHOW:
 {
-ISfxTemplateCommon* pDesigner = SFX_APP()->
-
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
-bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == 

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

2014-05-06 Thread Stephan Bergmann
 include/sfx2/sfx.hrc|4 
 include/svx/svxids.hrc  |7 ---
 include/vcl/svapp.hxx   |8 
 include/vcl/window.hxx  |1 -
 svx/source/tbxctrls/layctrl.cxx |8 
 vcl/source/app/svapp.cxx|4 
 vcl/source/window/window.cxx|4 
 7 files changed, 36 deletions(-)

New commits:
commit f4d3558334c5b403c2f1298f2ef831607778dae5
Author: Stephan Bergmann 
Date:   Tue May 6 14:25:46 2014 +0200

Application::UserEvent and Window::UserEvent are empty

...and never overridden, so can be removed along with the dead
SVX_EVENT_COLUM_WINDOW_EXECUTE code that calls them.

Change-Id: Ie500066c083f8fbf649c64f2d61fb85901473b5c

diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index b8ccfa4..ad533aa 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -38,10 +38,6 @@
 #define EVENT_APP_START 2
 //  EVENT_APP_END   2
 
-#define EVENT_OBJ_START 3
-
-#define EVENT_SVX_START (EVENT_OBJ_START+0x0400)
-
 // Warning: the following are simultaneously SID_ON_ ...
 #define SFX_EVENT_CLOSEAPP  (EVENT_SFX_START + 1)
 #define SFX_EVENT_CREATEDOC (EVENT_SFX_START + 2)
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 0bd819f..ec38491 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -88,13 +88,6 @@
 #define MID_ZOOMSLIDER_MINZOOM  0x7b
 #define MID_ZOOMSLIDER_MAXZOOM  0x7c
 
-
-// Event-Id's Block 1
-
-
-#define SVX_EVENT_COLUM_WINDOW_EXECUTE  (EVENT_SVX_START)
-
-
 // Event-Id's Block 2
 
 
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1b8f6e1..7f330f5 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -350,14 +350,6 @@ public:
 */
 virtual bool   QueryExit();
 
-/** Send user event.
-
-@param  nEvent  The numeric ID of the event
-@param  pEventData  Pointer to a data associated with the event. Use
-a reinterpret_cast to pass in the parameter.
-*/
-virtual voidUserEvent( sal_uLong nEvent, void* pEventData 
);
-
 /** @name Change Notification Functions
 
 Functions that notify when changes occur in the application.
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 001dfd5..5dc7340 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -695,7 +695,6 @@ public:
 virtual voidRequestHelp( const HelpEvent& rHEvt );
 virtual voidCommand( const CommandEvent& rCEvt );
 virtual voidTracking( const TrackingEvent& rTEvt );
-virtual voidUserEvent( sal_uLong nEvent, void* pEventData );
 virtual voidStateChanged( StateChangedType nStateChange );
 virtual voidDataChanged( const DataChangedEvent& rDCEvt );
 virtual boolPreNotify( NotifyEvent& rNEvt );
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index e0fcd32..051adbb 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -373,10 +373,6 @@ void TableWindow::Update( long nNewCol, long nNewLine )
 
 void TableWindow::TableDialog( const Sequence< PropertyValue >& rArgs )
 {
-Window* pParent = rTbx.GetParent();
-sal_uInt16 nId = GetId();
-pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, 
reinterpret_cast(nId));
-
 Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY );
 if ( xDispatchProvider.is() )
 {
@@ -693,10 +689,6 @@ void ColumnsWindow::PopupModeEnd()
 {
 if ( !IsPopupModeCanceled() && nCol )
 {
-sal_uInt16 nId = GetId();
-Window* pParent = rTbx.GetParent();
-pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, 
reinterpret_cast(nId));
-
 Sequence< PropertyValue > aArgs( 2 );
 aArgs[0].Name = "Columns";
 aArgs[0].Value = makeAny( sal_Int16( nCol ));
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ba2c51f..4c8a254 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -219,10 +219,6 @@ bool Application::QueryExit()
 return true;
 }
 
-void Application::UserEvent( sal_uLong, void* )
-{
-}
-
 void Application::FocusChanged()
 {
 }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2b155e9..d329a92 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4945,10 +4945,6 @@ void Window::Tracking( const TrackingEvent& rTEvt )
 pWrapper->Tracking( rTEvt );
 }
 
-void Window::UserEvent( sal_uLong, void* )
-{
-}
-
 void Window::StateChanged( StateChangedType eType )
 {
 switch (eType)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 sc/uiconfig sd/uiconfig sfx2/source sw/uiconfig

2014-08-29 Thread Samuel Mehrbrodt
 include/sfx2/sfx.hrc |6 --
 include/sfx2/viewfrm.hxx |1 +
 sc/uiconfig/scalc/toolbar/standardbar.xml|2 --
 sc/uiconfig/scalc/toolbar/viewerbar.xml  |1 -
 sd/uiconfig/sdraw/toolbar/standardbar.xml|2 --
 sd/uiconfig/sdraw/toolbar/viewerbar.xml  |1 -
 sfx2/source/view/view.src|   12 +++-
 sfx2/source/view/viewfrm.cxx |   18 --
 sw/uiconfig/sglobal/toolbar/standardbar.xml  |2 --
 sw/uiconfig/sglobal/toolbar/viewerbar.xml|1 -
 sw/uiconfig/sweb/toolbar/standardbar.xml |2 --
 sw/uiconfig/sweb/toolbar/viewerbar.xml   |1 -
 sw/uiconfig/swform/toolbar/standardbar.xml   |2 --
 sw/uiconfig/swform/toolbar/viewerbar.xml |1 -
 sw/uiconfig/swreport/toolbar/standardbar.xml |2 --
 sw/uiconfig/swreport/toolbar/viewerbar.xml   |1 -
 sw/uiconfig/swriter/toolbar/standardbar.xml  |2 --
 sw/uiconfig/swriter/toolbar/viewerbar.xml|1 -
 sw/uiconfig/swxform/toolbar/standardbar.xml  |2 --
 sw/uiconfig/swxform/toolbar/viewerbar.xml|1 -
 20 files changed, 32 insertions(+), 29 deletions(-)

New commits:
commit c6270de939d5ee51b61dc4ac02c52f1d9b5b1e47
Author: Samuel Mehrbrodt 
Date:   Fri Aug 29 00:35:07 2014 +0200

fdo#80538 Show an infobar when document is in read-only mode

and remove the Edit icon from the toolbar

Change-Id: I27d9506bd0fb76b3f1ad056a9866f7744674a3e2
Reviewed-on: https://gerrit.libreoffice.org/11182
Reviewed-by: Bosdonnat Cedric 
Tested-by: Bosdonnat Cedric 

diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 6c8d6e1..6909d1c 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -151,8 +151,10 @@
 #define STR_PASSWD_MIN_LEN  (RID_SFX_START+124)
 #define STR_NONCHECKEDOUT_DOCUMENT  (RID_SFX_START+125)
 #define BT_CHECKOUT (RID_SFX_START+126)
-#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+127)
-#define STR_MODULENOTINSTALLED  (RID_SFX_START+128)
+#define BT_READONLY_EDIT(RID_SFX_START+127)
+#define STR_READONLY_DOCUMENT   (RID_SFX_START+128)
+#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+129)
+#define STR_MODULENOTINSTALLED  (RID_SFX_START+130)
 #define STR_ACCTITLE_PRODUCTIVITYTOOLS  (RID_SFX_START+157)
 
 #define SFX_THUMBNAIL_TEXT  (RID_SFX_START+158)
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 16088cd..919ed9d 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -77,6 +77,7 @@ private:
 protected:
 virtual voidNotify( SfxBroadcaster& rBC, const SfxHint& rHint 
) SAL_OVERRIDE;
 
+DECL_LINK( SwitchReadOnlyHandler, void * );
 SAL_DLLPRIVATE void KillDispatcher_Impl();
 
 virtual ~SfxViewFrame();
diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml 
b/sc/uiconfig/scalc/toolbar/standardbar.xml
index 5368218..84c9f16 100644
--- a/sc/uiconfig/scalc/toolbar/standardbar.xml
+++ b/sc/uiconfig/scalc/toolbar/standardbar.xml
@@ -26,8 +26,6 @@
  
  
  
- 
- 
  
  
  
diff --git a/sc/uiconfig/scalc/toolbar/viewerbar.xml 
b/sc/uiconfig/scalc/toolbar/viewerbar.xml
index a371876..926e465 100644
--- a/sc/uiconfig/scalc/toolbar/viewerbar.xml
+++ b/sc/uiconfig/scalc/toolbar/viewerbar.xml
@@ -20,7 +20,6 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
  
  
- 
  
  
  
diff --git a/sd/uiconfig/sdraw/toolbar/standardbar.xml 
b/sd/uiconfig/sdraw/toolbar/standardbar.xml
index 8b8af1f..589be80 100644
--- a/sd/uiconfig/sdraw/toolbar/standardbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/standardbar.xml
@@ -26,8 +26,6 @@
  
  
  
- 
- 
  
  
  
diff --git a/sd/uiconfig/sdraw/toolbar/viewerbar.xml 
b/sd/uiconfig/sdraw/toolbar/viewerbar.xml
index c57e61d..da905ab 100644
--- a/sd/uiconfig/sdraw/toolbar/viewerbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/viewerbar.xml
@@ -20,7 +20,6 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
  
  
- 
  
  
  
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index c4213fc..85472fe 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -84,7 +84,11 @@ String STR_REPAIREDDOCUMENT
 
 String STR_NONCHECKEDOUT_DOCUMENT
 {
-Text [ en-US ] = "Document is not checked out on server" ;
+Text [ en-US ] = "This document is not checked out on the server." ;
+};
+String STR_READONLY_DOCUMENT
+{
+Text [ en-US ] = "This document is opened in read-only mode." ;
 };
 
 PushButton BT_CHECKOUT
@@ -93,5 +97,11 @@ PushButton BT_CHECKOUT
 Size = MAP_APPFONT( 30 , 0 );
 Text[ en-US ] = "Check out";
 };
+PushButton BT_READONLY_EDIT
+{
+Pos = MAP_APPFONT( 0 , 0 );
+Size = MAP_APPFONT( 70 , 0 );
+Text[ en-US ] = "Edit document";
+};
 
 /* vim:set shiftwidth=

[Libreoffice-commits] core.git: include/sfx2 sc/source sfx2/source svx/source sw/source

2014-09-01 Thread Lionel Elie Mamane
 include/sfx2/shell.hxx |2 +-
 include/sfx2/viewsh.hxx|4 
 sc/source/ui/inc/tabvwsh.hxx   |3 ++-
 sfx2/source/view/viewfrm.cxx   |   12 ++--
 svx/source/form/fmview.cxx |3 ---
 sw/source/uibase/app/docsh.cxx |1 +
 sw/source/uibase/inc/view.hxx  |4 ++--
 7 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 15cea073e7ed4970e60967fe036fc492e2052203
Author: Lionel Elie Mamane 
Date:   Wed Aug 27 18:34:02 2014 +0200

fdo#44081 don't remove 'edit' pop-up menu entry from form in design mode

Change-Id: I9700d0d729a8f2d1255fcd03a07e05799e21f8d0
Reviewed-on: https://gerrit.libreoffice.org/11152
Reviewed-by: Bosdonnat Cedric 
Tested-by: Bosdonnat Cedric 
Reviewed-by: Miklos Vajna 

diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index b79fd2d..9359324 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -160,7 +160,7 @@ protected:
 */
 SfxShell( SfxViewShell *pViewSh );
 
-SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell* pView );
+void SetViewShell_Impl( SfxViewShell* pView );
 SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 
nId );
 SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const;
 SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj );
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 5cde831..0ed5838 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -59,6 +59,7 @@ class SfxFrameItem;
 class Dialog;
 class Menu;
 class NotifyEvent;
+class FmFormShell;
 
 #define SFX_PRINTER_PRINTER   1  // without JOB SETUP => Temporary
 #define SFX_PRINTER_JOBSETUP 2
@@ -207,6 +208,9 @@ public:
 voidRemoveSubShell( SfxShell *pShell=NULL );
 SfxShell*   GetSubShell( sal_uInt16 );
 
+virtual   FmFormShell*  GetFormShell()   { return 0; };
+virtual const FmFormShell*  GetFormShell() const { return 0; };
+
 // Focus, KeyInput, Cursor
 voidGotFocus() const;
 inline void LostFocus() const;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index b20b829..d1be501 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -366,7 +366,8 @@ public:
 inline void SetScSbxObject( SbxObject* pOb )
 { pScSbxObject = pOb; }
 
-FmFormShell*GetFormShell() const{ return pFormShell; }
+virtual const FmFormShell* GetFormShell() const SAL_OVERRIDE { return 
pFormShell; }
+virtual   FmFormShell* GetFormShell()   SAL_OVERRIDE { return 
pFormShell; }
 
 voidInsertURL( const OUString& rName, const OUString& rURL, const 
OUString& rTarget,
 sal_uInt16 nMode );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c01974d..5434fa6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -866,8 +867,15 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
 {
 case SID_EDITDOC:
 {
-if ( !pSh || !pSh->HasName() || !( 
pSh->Get_Impl()->nLoadedFlags &  SFX_LOADED_MAINDOCUMENT )
-  || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+SfxViewShell *pVSh;
+FmFormShell *pFSh;
+if ( !pSh ||
+ !pSh->HasName() ||
+ !( pSh->Get_Impl()->nLoadedFlags &  
SFX_LOADED_MAINDOCUMENT ) ||
+ ( pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
+   ( !(pVSh = pSh->GetViewShell())  ||
+ !(pFSh = pVSh->GetFormShell()) ||
+ !pFSh->IsDesignMode(
 rSet.DisableItem( SID_EDITDOC );
 else
 {
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 343c624..b4e8a96 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -130,9 +130,6 @@ void FmFormView::Init()
 }
 }
 
-if( pObjShell && pObjShell->IsReadOnly() )
-bInitDesignMode = false;
-
 // dieses wird in der Shell vorgenommen
 // bDesignMode = !bInitDesignMode;  // erzwingt, dass SetDesignMode 
ausgefuehrt wird
 SetDesignMode( bInitDesignMode );
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index e3491cb..3da9550 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1084,6 +1084,7 @@ SfxStyleSheetBasePool*  SwDocShell::GetStyleSheetPool()
 
 void SwDocShell::SetView(SwView* pVw)
 {
+SetViewShell_Impl(pVw);
 if ( 0 != (mpView = pVw) )
 mpWrtShell = &mpView->GetWrtShell();
 else
diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx
index f

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

2014-04-04 Thread Caolán McNamara
 include/sfx2/objsh.hxx   |3 +--
 sc/source/ui/docshell/docsh.cxx  |2 +-
 sc/source/ui/inc/docsh.hxx   |2 +-
 sfx2/source/appl/appserv.cxx |2 +-
 sfx2/source/doc/objserv.cxx  |2 +-
 sfx2/source/doc/objxtor.cxx  |4 ++--
 sw/inc/docsh.hxx |2 +-
 sw/source/core/uibase/app/docsh2.cxx |2 +-
 8 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit e7c0f8711f95895b501c869959fe07b93d0a1e80
Author: Caolán McNamara 
Date:   Fri Apr 4 14:59:35 2014 +0100

"2" as arg for PrepareClose is never checked for

The 2 for PrepareClose came in with 38db42605a5b72efd55a43eff81fbc517fe0424b
"#89423#: added SID_CLOSEDOC, SID_BACKTOWEBTOP, SID_LOGOUT in PluginMenu" 
and
was checked with if( SfxApplication::IsPlugin() == sal_False || bUI == 2 ) 
in
sfx2/source/doc/objxtor.cxx  and then that was removed with
367568c891771d20bb8f8b3b579857f51c0e9016 "#132394#: remove superfluous code"

Change-Id: Ib273c88b4365ea6b261c7e52bbe1876aa796dc17

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index c7b9ad9..a3d32c9 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -401,8 +401,7 @@ public:
 static sal_uInt32   HandleFilter( SfxMedium* pMedium, 
SfxObjectShell* pDoc );
 
 virtual voidViewAssigned();
-// the bUI parameter may be sal_False, sal_True or 2 - there is some kind 
of hack at work
-virtual boolPrepareClose( sal_Bool bUI = sal_True );
+virtual boolPrepareClose(bool bUI = true);
 virtual boolIsInformationLost();
 virtual sal_uInt16  GetHiddenInformationState( sal_uInt16 nStates 
);
 sal_Int16   QueryHiddenInformation( HiddenWarningFact 
eFact, Window* pParent );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 28ae7fa..329e38e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2505,7 +2505,7 @@ bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId )
 }
 
 
-bool ScDocShell::PrepareClose( sal_Bool bUI )
+bool ScDocShell::PrepareClose( bool bUI )
 {
 if(SC_MOD()->GetCurRefDlgId()>0)
 {
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 2941b62..9da6caf 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -209,7 +209,7 @@ public:
 virtual boolSave() SAL_OVERRIDE;
 virtual boolSaveAs( SfxMedium& rMedium ) SAL_OVERRIDE;
 virtual boolConvertTo( SfxMedium &rMedium ) SAL_OVERRIDE;
-virtual boolPrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE;
+virtual boolPrepareClose( bool bUI = true ) SAL_OVERRIDE;
 virtual voidPrepareReload() SAL_OVERRIDE;
 virtual boolIsInformationLost() SAL_OVERRIDE;
 virtual voidLoadStyles( SfxObjectShell &rSource ) SAL_OVERRIDE;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index a80a91a..50e71ce 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -286,7 +286,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 if ( !pFrame || !pFrame->GetWindow().IsReallyVisible() )
 continue;
 
-if ( pObjSh->PrepareClose(2) )
+if (pObjSh->PrepareClose(true))
 pObjSh->SetModified( false );
 else
 return;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 085b697..f01f199 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -855,7 +855,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 }
 
 // Cancelled by the user?
-if ( !PrepareClose( 2 ) )
+if (!PrepareClose(true))
 {
 rReq.SetReturnValue( SfxBoolItem(0, false) );
 rReq.Done();
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index a8fae9e..0d00015 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -558,8 +558,8 @@ struct BoolEnv_Impl
 
 bool SfxObjectShell::PrepareClose
 (
-sal_BoolbUI   // sal_True: Dialog and so on is allowed
-  // sal_False: silent-mode
+bool bUI   // true: Dialog and so on is allowed
+   // false: silent-mode
 )
 {
 if( pImp->bInPrepareClose || pImp->bPreparedForClose )
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index a3c09ab..179744a 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -90,7 +90,7 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public 
SfxListener
 SAL_DLLPRIVATE virtual bool SaveAs( SfxMedium& rMedium ) SAL_OVERRIDE;
 SAL_DLLPRIVATE virtual bool SaveCompleted( const 
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage 
) SAL_OVERRIDE;
 

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

2014-03-13 Thread Noel Grandin
 include/sfx2/brokenpackageint.hxx  |4 ++--
 include/sfx2/dinfdlg.hxx   |   20 ++--
 include/sfx2/evntconf.hxx  |2 +-
 include/sfx2/objsh.hxx |4 ++--
 include/sfx2/templatelocalview.hxx |2 +-
 include/sfx2/thumbnailview.hxx |2 +-
 include/svl/itemprop.hxx   |2 +-
 include/svl/undo.hxx   |2 +-
 sfx2/inc/guisaveas.hxx |6 +++---
 sfx2/source/appl/appuno.cxx|   12 ++--
 sfx2/source/appl/shutdowniconunx.cxx   |2 +-
 sfx2/source/config/evntconf.cxx|4 ++--
 sfx2/source/control/templatelocalview.cxx  |2 +-
 sfx2/source/control/thumbnailview.cxx  |2 +-
 sfx2/source/dialog/filedlghelper.cxx   |2 +-
 sfx2/source/doc/DocumentMetadataAccess.cxx |4 ++--
 sfx2/source/doc/SfxDocumentMetaData.cxx|6 +++---
 sfx2/source/doc/guisaveas.cxx  |7 ---
 sfx2/source/doc/objstor.cxx|4 ++--
 svl/source/fsstor/fsstorage.cxx|2 +-
 svl/source/inc/passwordcontainer.hxx   |2 +-
 svl/source/items/itemprop.cxx  |2 +-
 svl/source/passwordcontainer/passwordcontainer.cxx |4 ++--
 svl/source/undo/undo.cxx   |2 +-
 24 files changed, 51 insertions(+), 50 deletions(-)

New commits:
commit 0dc38bdde056cf33a545d85f9e1211f06d579ff7
Author: Noel Grandin 
Date:   Thu Mar 13 09:34:37 2014 +0200

sfx2,svl: prefer passing OUString and OString by reference

Change-Id: I9833265f6e635a057cea2c4a945cc73809b1e2ef

diff --git a/include/sfx2/brokenpackageint.hxx 
b/include/sfx2/brokenpackageint.hxx
index c93d41e..1047b30 100644
--- a/include/sfx2/brokenpackageint.hxx
+++ b/include/sfx2/brokenpackageint.hxx
@@ -28,7 +28,7 @@ class SFX2_DLLPUBLIC RequestPackageReparation
 {
 RequestPackageReparation_Impl* pImp;
 public:
-RequestPackageReparation( OUString aName );
+RequestPackageReparation( const OUString& aName );
 ~RequestPackageReparation();
 sal_BoolisApproved();
 com::sun::star::uno::Reference < 
::com::sun::star::task::XInteractionRequest > GetRequest();
@@ -39,7 +39,7 @@ class SFX2_DLLPUBLIC NotifyBrokenPackage
 {
 NotifyBrokenPackage_Impl* pImp;
 public:
-NotifyBrokenPackage( OUString aName );
+NotifyBrokenPackage( const OUString& aName );
 ~NotifyBrokenPackage();
 sal_BoolisAborted();
 com::sun::star::uno::Reference < 
::com::sun::star::task::XInteractionRequest > GetRequest();
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 3d572b3..beffc57 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -110,13 +110,13 @@ public:
 sal_Int32   getAutoloadDelay() const { return m_AutoloadDelay; }
 voidsetAutoloadDelay(sal_Int32 i_val) { m_AutoloadDelay = i_val; }
 OUString getAutoloadURL() const { return m_AutoloadURL; }
-voidsetAutoloadURL(OUString i_val) { m_AutoloadURL = i_val; }
+voidsetAutoloadURL(const OUString& i_val) { m_AutoloadURL = i_val; 
}
 OUString getDefaultTarget() const { return m_DefaultTarget; }
-voidsetDefaultTarget(OUString i_val) { m_DefaultTarget = i_val; }
+voidsetDefaultTarget(const OUString& i_val) { m_DefaultTarget = 
i_val; }
 OUString getTemplateName() const { return m_TemplateName; }
-voidsetTemplateName(OUString i_val) { m_TemplateName = i_val; }
+voidsetTemplateName(const OUString& i_val) { m_TemplateName = 
i_val; }
 OUString getAuthor() const { return m_Author; }
-voidsetAuthor(OUString i_val) { m_Author = i_val; }
+voidsetAuthor(const OUString& i_val) { m_Author = i_val; }
 
 ::com::sun::star::util::DateTime
 getCreationDate() const { return m_CreationDate; }
@@ -124,7 +124,7 @@ public:
 m_CreationDate = i_val;
 }
 OUString getModifiedBy() const { return m_ModifiedBy; }
-voidsetModifiedBy(OUString i_val) { m_ModifiedBy = i_val; }
+voidsetModifiedBy(const OUString& i_val) { m_ModifiedBy = i_val; }
 
 ::com::sun::star::util::DateTime
 getModificationDate() const { return m_ModificationDate; }
@@ -132,7 +132,7 @@ public:
 m_ModificationDate = i_val;
 }
 OUString getPrintedBy() const { return m_PrintedBy; }
-voidsetPrintedBy(OUString i_val) { m_PrintedBy = i_val; }
+voidsetPrintedBy(const OUString& i_val) { m_PrintedBy = i_val; }
 ::com::sun::star::util::DateTime
 getPrintDate() const { return m_PrintDate; }
 voidsetPrintDate(::com::sun::star::util::DateTime i_val) {

[Libreoffice-commits] core.git: include/sfx2 include/svx sfx2/Library_sfx.mk sfx2/source svx/source unusedcode.easy

2013-08-11 Thread Caolán McNamara
 include/sfx2/sidebar/SidebarToolBox.hxx|3 
 include/svx/dlgctrl.hxx|1 
 sfx2/Library_sfx.mk|1 
 sfx2/source/sidebar/ControlFactory.cxx |1 
 sfx2/source/sidebar/CustomImageRadioButton.cxx |   77 -
 sfx2/source/sidebar/CustomImageRadioButton.hxx |   48 ---
 sfx2/source/sidebar/SidebarToolBox.cxx |   39 
 svx/source/dialog/dlgctrl.cxx  |   14 
 unusedcode.easy|1 
 9 files changed, 185 deletions(-)

New commits:
commit 16b35898c35db6b2da69e336903f9bbf73c78326
Author: Caolán McNamara 
Date:   Sun Aug 11 10:45:41 2013 +0100

callcatcher: another layer of unused methods

Change-Id: I70e84f691bcf1b1e1025fd5a534c275633f865d1

diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx 
b/include/sfx2/sidebar/SidebarToolBox.hxx
index c3e01b8..5627749 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -51,7 +51,6 @@ public:
 const Size& rRequestedSize = Size(),
 sal_uInt16 nPos = TOOLBOX_APPEND);
 
-void SetBorderWindow (const Window* pBorderWindow);
 virtual void Paint (const Rectangle& rRect);
 
 virtual Point GetPosPixel (void) const;
@@ -98,8 +97,6 @@ private:
 const sal_uInt16 nItemId,
 const cssu::Reference& rxFrame,
 const sal_Int32 nItemWidth = 0);
-void UpdateIcons (
-const cssu::Reference& rxFrame);
 void RegisterHandlers (void);
 };
 
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index ed5a3e1..8bc5142 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -354,7 +354,6 @@ protected:
 void LocalPostPaint();
 
 public:
-SvxPreviewBase(Window* pParent, const ResId& rResId);
 SvxPreviewBase(Window* pParent);
 virtual ~SvxPreviewBase();
 
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 836f232..03f3afe 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -250,7 +250,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
 sfx2/source/sidebar/ControlFactory \
 sfx2/source/sidebar/ControllerFactory \
 sfx2/source/sidebar/ControllerItem \
-sfx2/source/sidebar/CustomImageRadioButton \
 sfx2/source/sidebar/Deck \
 sfx2/source/sidebar/DeckDescriptor \
 sfx2/source/sidebar/DeckLayouter \
diff --git a/sfx2/source/sidebar/ControlFactory.cxx 
b/sfx2/source/sidebar/ControlFactory.cxx
index ea5d19a..2e67434 100644
--- a/sfx2/source/sidebar/ControlFactory.cxx
+++ b/sfx2/source/sidebar/ControlFactory.cxx
@@ -22,7 +22,6 @@
 #include "TabItem.hxx"
 #include "sfx2/sidebar/SidebarToolBox.hxx"
 #include "ToolBoxBackground.hxx"
-#include "CustomImageRadioButton.hxx"
 #include 
 
 
diff --git a/sfx2/source/sidebar/CustomImageRadioButton.cxx 
b/sfx2/source/sidebar/CustomImageRadioButton.cxx
deleted file mode 100644
index a92f4d9..000
--- a/sfx2/source/sidebar/CustomImageRadioButton.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "CustomImageRadioButton.hxx"
-
-#include "DrawHelper.hxx"
-#include "Paint.hxx"
-#include "sfx2/sidebar/Tools.hxx"
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-
-namespace sfx2 { namespace sidebar {
-
-
-CustomImageRadioButton::CustomImageRadioButton (
-Window* pParentWindow,
-const ResId& rResId )
-: ImageRadioButton( pParentWindow, rResId )
-{
-SetStyle( GetStyle() | WB_NOPOINTERFOCUS );
-}
-
-
-CustomImageRadioButton::~CustomImageRadioButton (void)
-{
-}
-
-
-void CustomImageRadioButton::Paint (const Rectangle& /*rUpdateArea*/)
-{
-Rectangle aPaintRect( Rectangle(Point(0,0), GetSizePixel() ) );
-SetMouseRect( aPaintRect );
-SetStateRect( aPaintRect );
-
-const Theme::ThemeItem eBackground =
-IsMouseOver()
-  ? Theme::Paint_TabItemBackgroundHighlight
-  : Theme::Paint_PanelBackground;
-DrawHelper::DrawRoundedRectangle(
-*this,
-aPaintRect,
-Theme::GetInteger(Theme::Int

[Libreoffice-commits] core.git: include/sfx2 sc/source sd/source sfx2/source sw/inc sw/source

2013-08-14 Thread Ivan Timofeev
 include/sfx2/viewsh.hxx|4 -
 sc/source/ui/inc/prevwsh.hxx   |4 -
 sc/source/ui/inc/tabvwsh.hxx   |4 -
 sc/source/ui/inc/viewdata.hxx  |4 -
 sc/source/ui/view/prevwsh.cxx  |   13 +--
 sc/source/ui/view/tabvwsh4.cxx |4 -
 sc/source/ui/view/viewdata.cxx |   62 --
 sd/source/ui/inc/ViewShell.hxx |4 -
 sd/source/ui/inc/ViewShellBase.hxx |4 -
 sd/source/ui/view/ViewShellBase.cxx|4 -
 sd/source/ui/view/viewshe2.cxx |4 -
 sfx2/source/view/sfxbasecontroller.cxx |5 -
 sfx2/source/view/viewsh.cxx|4 -
 sw/inc/shellio.hxx |4 -
 sw/source/filter/basflt/fltini.cxx |  111 -
 sw/source/ui/dbui/mmoutputpage.cxx |4 -
 sw/source/ui/dialog/ascfldlg.cxx   |4 -
 sw/source/ui/inc/pview.hxx |6 -
 sw/source/ui/inc/view.hxx  |4 -
 sw/source/ui/uiview/pview.cxx  |2 
 sw/source/ui/uiview/view.cxx   |   42 ++--
 sw/source/ui/uiview/view1.cxx  |2 
 sw/source/ui/uno/SwXFilterOptions.cxx  |4 -
 23 files changed, 148 insertions(+), 155 deletions(-)

New commits:
commit dde3a753cead04915259d3fde0e913096f1a3922
Author: Ivan Timofeev 
Date:   Wed Aug 14 18:41:28 2013 +0400

convert Read/WriteUserData methods to OUString and bool

Change-Id: I06a8158b7f503976b19383014a7c8a867c0184ea

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index b09708e..9b5f0bc 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -219,8 +219,8 @@ public:
 Printer*GetActivePrinter() const;
 
 // Working set
-virtual voidWriteUserData( String&, sal_Bool bBrowse = 
sal_False );
-virtual voidReadUserData( const String&, sal_Bool bBrowse 
= sal_False );
+virtual voidWriteUserData( OUString&, bool bBrowse = false 
);
+virtual voidReadUserData( const OUString&, bool bBrowse = 
false );
 virtual voidWriteUserDataSequence ( 
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, 
sal_Bool bBrowse = sal_False );
 virtual voidReadUserDataSequence ( const 
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, 
sal_Bool bBrowse = sal_False );
 virtual voidQueryObjAreaPixel( Rectangle& rRect ) const;
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 8a49100..c358280 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -73,8 +73,8 @@ protected:
 
 virtual String  GetDescription() const;
 
-virtual voidWriteUserData(String &, sal_Bool bBrowse = false);
-virtual voidReadUserData(const String &, sal_Bool bBrowse = false);
+virtual voidWriteUserData(OUString &, bool bBrowse = false);
+virtual voidReadUserData(const OUString &, bool bBrowse = false);
 
 virtual voidWriteUserDataSequence (::com::sun::star::uno::Sequence < 
::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
 virtual voidReadUserDataSequence (const 
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, 
sal_Bool bBrowse = false );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index a5da444..9ca90c8 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -217,8 +217,8 @@ protected:
 virtual sal_BoolHasSelection( sal_Bool bText ) const;
 virtual String  GetDescription() const;
 
-virtual voidWriteUserData(String &, sal_Bool bBrowse = false);
-virtual voidReadUserData(const String &, sal_Bool bBrowse = false);
+virtual voidWriteUserData(OUString &, bool bBrowse = false);
+virtual voidReadUserData(const OUString &, bool bBrowse = false);
 virtual voidWriteUserDataSequence (::com::sun::star::uno::Sequence < 
::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
 virtual voidReadUserDataSequence (const 
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, 
sal_Bool bBrowse = false );
 
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 2ea9689..ca90f3e 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -252,8 +252,8 @@ public:
 
 voidUpdateInputHandler( sal_Bool bForce = false, sal_Bool 
bStopEditing = sal_True );
 
-voidWriteUserData(String& rData);
-voidReadUserData(const String& rData);
+voidWriteUserData(OUString& rData);
+voidReadUserData(const OUString& rData);
 voidWriteExtOptions( ScExtDocOptions& rOpt ) const;
 voidReadExtOptions( const ScExtDocOptions& rOpt );
 voidWriteUserData

[Libreoffice-commits] core.git: include/sfx2 sc/source sd/source sfx2/source starmath/source sw/source

2014-07-29 Thread Stephan Bergmann
 include/sfx2/app.hxx  |1 -
 sc/source/ui/app/scmod.cxx|2 +-
 sd/source/ui/app/sdmod.cxx|3 +--
 sfx2/source/appl/app.cxx  |9 -
 sfx2/source/appl/appinit.cxx  |4 ++--
 sfx2/source/appl/appserv.cxx  |2 +-
 sfx2/source/bastyp/sfxresid.cxx   |3 +--
 starmath/source/smmod.cxx |3 +--
 sw/source/ui/dialog/swdialmgr.cxx |4 ++--
 sw/source/uibase/app/swmodule.cxx |2 +-
 10 files changed, 10 insertions(+), 23 deletions(-)

New commits:
commit 551f76f410c5a2b8efb7e4736ca0e1440bd58276
Author: Stephan Bergmann 
Date:   Tue Jul 29 14:27:34 2014 +0200

Drop unnecessary SfxApplication::CreateResManager wrapper

Change-Id: I2b8662ec85b8f710aa17a2c6f59c4b35af7685f3

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 0928635..0a11a06 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -153,7 +153,6 @@ public:
 
 // Resource Manager
 ResMgr* GetSfxResManager();
-static ResMgr*  CreateResManager( const char *pPrefix );
 
 // DDE
 #if defined( WNT )
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index d534592..84eddf0 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -130,7 +130,7 @@ void ScModule::InitInterface_Impl()
 }
 
 ScModule::ScModule( SfxObjectFactory* pFact ) :
-SfxModule( SfxApplication::CreateResManager( "sc" ), false, pFact, NULL ),
+SfxModule( ResMgr::CreateResMgr( "sc" ), false, pFact, NULL ),
 mpDragData(new ScDragData),
 mpClipData(new ScClipData),
 pSelTransfer( NULL ),
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 9bd820d..8bde8c4 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -68,7 +67,7 @@ void SdModule::InitInterface_Impl()
 
 // Ctor
 SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
-:   SfxModule( SfxApplication::CreateResManager("sd"), false,
+:   SfxModule( ResMgr::CreateResMgr("sd"), false,
   pFact1, pFact2, NULL ),
 pTransferClip(NULL),
 pTransferDrag(NULL),
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index e30cd78..848c7a4 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -375,15 +375,6 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame 
*pFrame )
 pFrame->GetViewShell()->SetCurrentDocument();
 }
 
-
-
-ResMgr* SfxApplication::CreateResManager( const char *pPrefix )
-{
-return ResMgr::CreateResMgr(pPrefix);
-}
-
-
-
 ResMgr* SfxApplication::GetSfxResManager()
 {
 return SfxResId::GetResMgr();
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 9f2c548..7ee6c22 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -228,9 +228,9 @@ bool SfxApplication::Initialize_Impl()
 RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
 
 #ifndef DISABLE_SCRIPTING
-pAppData_Impl->pBasicResMgr = CreateResManager("sb");
+pAppData_Impl->pBasicResMgr = ResMgr::CreateResMgr("sb");
 #endif
-pAppData_Impl->pSvtResMgr = CreateResManager("svt");
+pAppData_Impl->pSvtResMgr = ResMgr::CreateResMgr("svt");
 
 pAppData_Impl->m_pSoErrorHdl = new SfxErrorHandler(
 RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, 
pAppData_Impl->pSvtResMgr );
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f3aaed6..90ca409 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -884,7 +884,7 @@ OUString ChooseMacro( const Reference< XModel >& 
rxLimitToDocument, bool bChoose
 ResMgr* SfxApplication::GetOffResManager_Impl()
 {
 if ( !pAppData_Impl->pOfaResMgr )
-pAppData_Impl->pOfaResMgr = CreateResManager( "ofa");
+pAppData_Impl->pOfaResMgr = ResMgr::CreateResMgr( "ofa");
 return pAppData_Impl->pOfaResMgr;
 }
 
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index 32487df..69de5b7 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -19,7 +19,6 @@
 
 
 #include 
-#include 
 #include "tools/resmgr.hxx"
 
 
@@ -36,7 +35,7 @@ ResMgr* SfxResId::GetResMgr()
 {
 if ( !pMgr )
 {
-pMgr = SfxApplication::CreateResManager("sfx");
+pMgr = ResMgr::CreateResMgr("sfx");
 }
 
 return pMgr;
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 8bc1ddc..7a746f4 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -164,7 +163,7 @@ void SmModule::InitInterface_Impl()
 }
 
 SmModule::SmModule(SfxObjectFactory* pObjFact) :
-SfxModule(SfxApplication::CreateResManager("sm"), false, pObjFact, NULL),
+SfxModule(ResMgr::CreateResMgr("sm"), false, pObjFact,

[Libreoffice-commits] core.git: include/sfx2 sc/source sd/source sfx2/source svx/source sw/source

2014-09-03 Thread Stefan Weiberg
 include/sfx2/sidebar/CommandInfoProvider.hxx |   27 +-
 include/sfx2/sidebar/ControllerFactory.hxx   |   11 +---
 include/sfx2/sidebar/ControllerItem.hxx  |7 +-
 include/sfx2/sidebar/Sidebar.hxx |4 -
 include/sfx2/sidebar/SidebarPanelBase.hxx|   42 +++-
 include/sfx2/sidebar/SidebarToolBox.hxx  |9 +--
 include/sfx2/sidebar/Theme.hxx   |   48 +--
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |6 +-
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx  |6 +-
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |6 +-
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx |6 +-
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx   |6 +-
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx   |6 +-
 sc/source/ui/sidebar/ScPanelFactory.cxx  |   12 ++--
 sd/source/ui/animations/CustomAnimationPane.cxx  |4 -
 sd/source/ui/animations/CustomAnimationPane.hxx  |2 
 sd/source/ui/animations/SlideTransitionPane.cxx  |4 -
 sd/source/ui/animations/SlideTransitionPane.hxx  |2 
 sd/source/ui/inc/createcustomanimationpanel.hxx  |2 
 sd/source/ui/inc/createslidetransitionpanel.hxx  |2 
 sd/source/ui/sidebar/LayoutMenu.cxx  |2 
 sd/source/ui/sidebar/MasterPagesSelector.cxx |2 
 sd/source/ui/sidebar/PanelFactory.cxx|4 -
 sfx2/source/sidebar/CommandInfoProvider.cxx  |5 -
 sfx2/source/sidebar/ControllerFactory.cxx|2 
 sfx2/source/sidebar/ControllerItem.cxx   |6 +-
 sfx2/source/sidebar/DeckTitleBar.cxx |2 
 sfx2/source/sidebar/Panel.cxx|3 -
 sfx2/source/sidebar/PanelTitleBar.cxx|2 
 sfx2/source/sidebar/Sidebar.cxx  |3 -
 sfx2/source/sidebar/SidebarController.cxx|   22 
 sfx2/source/sidebar/SidebarPanelBase.cxx |   34 ++---
 sfx2/source/sidebar/SidebarToolBox.cxx   |8 +--
 sfx2/source/sidebar/Theme.cxx|   36 +++---
 sfx2/source/sidebar/TitleBar.hxx |2 
 sfx2/source/sidebar/Tools.cxx|6 +-
 svx/source/sidebar/area/AreaPropertyPanel.cxx|6 +-
 svx/source/sidebar/area/AreaPropertyPanel.hxx|6 +-
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx  |6 +-
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx  |6 +-
 svx/source/sidebar/insert/InsertPropertyPanel.cxx|4 -
 svx/source/sidebar/line/LinePropertyPanel.cxx|6 +-
 svx/source/sidebar/line/LinePropertyPanel.hxx|6 +-
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx   |   10 +--
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx   |   14 ++---
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx  |   10 +--
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx  |   12 ++--
 svx/source/sidebar/text/TextPropertyPanel.cxx|6 +-
 svx/source/sidebar/text/TextPropertyPanel.hxx|4 -
 sw/source/uibase/sidebar/PagePropertyPanel.cxx   |   12 ++--
 sw/source/uibase/sidebar/PagePropertyPanel.hxx   |3 -
 sw/source/uibase/sidebar/SwPanelFactory.cxx  |8 +--
 52 files changed, 227 insertions(+), 243 deletions(-)

New commits:
commit 9fba10b5a5f1e56dde0cdc4859622fb40db1c13a
Author: Stefan Weiberg 
Date:   Tue Sep 2 17:38:00 2014 +

Related fdo#82088: removing another bunch of alias

Change-Id: I6e2ab6d20723803aedb530b4d25aa79ec0edbb8f
Reviewed-on: https://gerrit.libreoffice.org/11260
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 

diff --git a/include/sfx2/sidebar/CommandInfoProvider.hxx 
b/include/sfx2/sidebar/CommandInfoProvider.hxx
index bd95ce1..6eb1ba6 100644
--- a/include/sfx2/sidebar/CommandInfoProvider.hxx
+++ b/include/sfx2/sidebar/CommandInfoProvider.hxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 
-namespace cssu = ::com::sun::star::uno;
 
 namespace sfx2 { namespace sidebar {
 
@@ -57,34 +56,34 @@ public:
 */
 ::rtl::OUString GetLabelForCommand (
 const ::rtl::OUString& rsCommandName,
-const cssu::Reference& rxFrame);
+const css::uno::Reference& rxFrame);
 
 /** Do not call.  Should be part of a local and hidden interface.
 */
-void SetFrame (const cssu::Reference& rxFrame);
+void SetFrame (const css::uno::Reference& rxFrame);
 
   private:
-cssu::Reference mxContext;
-cssu::Reference mxCachedDataFrame;
-cssu::Reference 
mxCachedDocumentAcceleratorConfiguration;
-cssu::Reference 
mxCachedModuleAcceleratorConfiguration;
-cssu::Reference 
mxCachedGlobalAcceleratorConfiguration;
+css::uno::Reference mxContext;
+css::uno::Reference mxCachedDataFrame;
+css::uno::Reference 
mxCachedDocumentAcceleratorConfiguration;
+css::un

[Libreoffice-commits] core.git: include/sfx2 sfx2/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk

2014-09-05 Thread Caolán McNamara
 include/sfx2/tbxctrl.hxx |4 
 sfx2/source/toolbox/tbxitem.cxx  |   17 ++
 sw/UIConfig_swriter.mk   |1 
 sw/inc/globals.hrc   |5 
 sw/inc/helpid.h  |1 
 sw/source/uibase/inc/ribbar.hrc  |   35 -
 sw/source/uibase/inc/workctrl.hxx|7 -
 sw/source/uibase/ribbar/workctrl.cxx |   62 +++--
 sw/source/uibase/ribbar/workctrl.hrc |   23 ---
 sw/source/uibase/ribbar/workctrl.src |  173 ---
 sw/uiconfig/swriter/ui/floatingnavigation.ui |   54 
 11 files changed, 208 insertions(+), 174 deletions(-)

New commits:
commit 5fc238d11e939064a70573ef93939af49a241b20
Author: Caolán McNamara 
Date:   Thu Sep 4 16:54:05 2014 +0100

convert RID_SCROLL_NAVIGATION_WIN floating window to .ui

Change-Id: I92d13856fc4d206323d5517a8a48671bba683fec

diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 99202ff..7b68212 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -142,6 +142,10 @@ public:
const OString& rID, const OUString& 
rUIXMLDescription,
const 
css::uno::Reference &rFrame =

css::uno::Reference());
+SfxPopupWindow(sal_uInt16 nId, Window *pParent,
+   const OString& rID, const OUString& 
rUIXMLDescription,
+   const 
css::uno::Reference &rFrame =
+   
css::uno::Reference());
 SfxPopupWindow( sal_uInt16 nId,
 const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
 Window* pParentWindow,
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 090feb2..6aa1c9c 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1189,6 +1189,23 @@ SfxPopupWindow::SfxPopupWindow(
 ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
 }
 
+SfxPopupWindow::SfxPopupWindow(
+sal_uInt16 nId,
+Window* pParentWindow,
+const OString& rID, const OUString& rUIXMLDescription,
+const Reference< XFrame >& rFrame ) :
+FloatingWindow( pParentWindow, rID, rUIXMLDescription)
+, m_bFloating( false )
+, m_bCascading( false )
+, m_nId( nId )
+, m_xFrame( rFrame )
+, m_pStatusListener( 0 )
+{
+Window* pWindow = GetTopMostParentSystemWindow( this );
+if ( pWindow )
+((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
+}
+
 SfxPopupWindow::~SfxPopupWindow()
 {
 if ( m_xStatusListener.is() )
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 58df298..dbfb7d4 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -113,6 +113,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/fldrefpage \
sw/uiconfig/swriter/ui/fldvarpage \
sw/uiconfig/swriter/ui/floatingmmchild \
+   sw/uiconfig/swriter/ui/floatingnavigation \
sw/uiconfig/swriter/ui/floatingsync \
sw/uiconfig/swriter/ui/formatsectiondialog \
sw/uiconfig/swriter/ui/formattablepage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 99cad7c..ca0a2ef 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -81,11 +81,12 @@
 
 #define STR_READONLY_PATH   (RC_GLOBALS_BEGIN + 47)
 #define IL_SECTION_BITMAPS  (RC_GLOBALS_BEGIN + 48)
+#define IL_VALUES   (RC_GLOBALS_BEGIN + 49)
 
 // INFOBOX 
 
-#define STR_ERROR_CLPBRD_READ   (RC_GLOBALS_BEGIN + 49)
-#define STR_ERROR_PASSWD(RC_GLOBALS_BEGIN + 50)
+#define STR_ERROR_CLPBRD_READ   (RC_GLOBALS_BEGIN + 50)
+#define STR_ERROR_PASSWD(RC_GLOBALS_BEGIN + 51)
 
 // ACC ---
 
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 35a3bb9..39bb545 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -33,7 +33,6 @@
 
 #define HID_EDIT_WIN
"SW_HID_EDIT_WIN"
 
-#define HID_INSERT_CTRL 
"SW_HID_INSERT_CTRL" // TbxControl Einfuegen
 #define HID_INSERT_FIELD_CTRL   
"SW_HID_INSERT_FIELD_CTRL"
 
 #define HID_SOURCEVIEW  
"SW_HID_SOURCEVIEW"
diff --git a/sw/source/uibase/inc/ribbar.hrc b/sw/source/uibase/inc/ribbar.hrc
index 7070d24..ac38d31 100644
--- a/sw/source/uibase/inc/ribbar.hrc
+++ b/sw/source/uibase/inc/ribbar.hrc
@@ -23,20 +23,37 @@
 
 #define RID_TBX_FORMULA (RC_RIBBAR_BEGIN +6)
 #define 

[Libreoffice-commits] core.git: include/sfx2 oox/source reportdesign/source sfx2/sdi sfx2/source sw/source

2013-05-02 Thread Ádám Csaba Király
 include/sfx2/sfxsids.hrc   |1 
 oox/source/core/filterbase.cxx |2 -
 reportdesign/source/ui/report/ReportController.cxx |4 +++
 sfx2/sdi/sfx.sdi   |9 ++-
 sfx2/source/appl/appuno.cxx|9 +--
 sfx2/source/doc/guisaveas.cxx  |   25 -
 sfx2/source/doc/objserv.cxx|   22 --
 sw/source/ui/uiview/srcview.cxx|3 ++
 sw/source/ui/uiview/view.hrc   |2 +
 9 files changed, 51 insertions(+), 26 deletions(-)

New commits:
commit 7061e8403a3afddae253ad0a016e5613616030bb
Author: Ádám Csaba Király 
Date:   Wed Apr 3 21:05:12 2013 +0200

fdo#60780, refactor Save a Copy and fix

Refactor Save a Copy, basing it on Export functionality.
SID_SAVEACOPY takes its parameters, and sends a SID_EXPORTDOC
request with them, using SID_SAVEACOPYITEM to differentiate
Save a Copy from regular Export.

Fix storing docx to url, by preventing finalizeFilter method,
in filterbase.cxx, from writing back to the original file's
MediaDescriptor.

Change-Id: I876dbe17e43b26a43f29e797fdb157e31889ee1e
Reviewed-on: https://gerrit.libreoffice.org/3355
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 00923ff..cd25c9e 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -118,6 +118,7 @@
 #define SID_OPENTEMPLATE(SID_SFX_START + 594)
 #define SID_SAVEASDOC   (SID_SFX_START + 502)
 #define SID_SAVEACOPY   (SID_SFX_START + 999)
+#define SID_SAVEACOPYITEM   (SID_SFX_START + 998)
 #define SID_CLOSING (SID_SFX_START +1539)
 #define SID_CLOSEDOC(SID_SFX_START + 503)
 #define SID_CLOSEDOCS   (SID_SFX_START + 595)
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 4d31f05..13551fe 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -507,7 +507,7 @@ sal_Bool SAL_CALL FilterBase::filter( const Sequence< 
PropertyValue >& rMediaDes
 }
 break;
 }
-mxImpl->finalizeFilter();
+mxImpl->mxModel->unlockControllers();
 }
 return bRet;
 }
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 27c76ab..aa56679 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -793,6 +793,9 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) 
const
 case SID_SAVEASDOC:
 aReturn.bEnabled = isConnected() && isEditable();
 break;
+case SID_SAVEACOPY:
+aReturn.bEnabled = isConnected() && isEditable();
+break;
 case SID_EDITDOC:
 aReturn.bChecked = isEditable();
 break;
@@ -1913,6 +1916,7 @@ void OReportController::describeSupportedFeatures()
 implDescribeSupportedFeature( ".uno:NewDoc",
SID_NEWDOC, CommandGroup::DOCUMENT );
 implDescribeSupportedFeature( ".uno:Save",  
SID_SAVEDOC,CommandGroup::DOCUMENT );
 implDescribeSupportedFeature( ".uno:SaveAs",
SID_SAVEASDOC,  CommandGroup::DOCUMENT );
+implDescribeSupportedFeature( ".uno:SaveACopy", 
SID_SAVEACOPY,  CommandGroup::DOCUMENT );
 
 implDescribeSupportedFeature( ".uno:InsertPageNumberField", 
SID_INSERT_FLD_PGNUMBER,CommandGroup::INSERT );
 implDescribeSupportedFeature( ".uno:InsertDateTimeField",   
SID_DATETIME,   CommandGroup::INSERT );
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index ad70c3a..b8823d2 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5586,8 +5586,9 @@ SfxBoolItem SaveAsTemplate SID_DOCTEMPLATE
 ]
 
 //--
+
 SfxBoolItem SaveACopy SID_SAVEACOPY
-(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem 
PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions 
SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment 
SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem 
Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo 
SID_SAVETO)
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxBoolItem Overwrite SID_OVERWRITE, SfxStringItem 
FilterOptions SID_FILE_FILTEROPTIONS,SfxBoolItem SaveACopy SID_SAVEACOPYITEM)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -5602,9 +5603,6 @@ 

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

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

New commits:
commit b61970cfbe12722efd6218db6489980381b8783d
Author: Cao Cuong Ngo 
Date:   Thu Sep 12 15:27:37 2013 +0200

Cmis Versions dialog

Change-Id: Ie863282062a6932a55543143e841917c54223ac9
Reviewed-on: https://gerrit.libreoffice.org/5925
Reviewed-by: Bosdonnat Cedric 
Tested-by: Bosdonnat Cedric 

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 4d530d9..ee2ff12 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
//
@@ -714,6 +715,7 @@ public:
 SAL_DLLPRIVATE void CheckOut( );
 SAL_DLLPRIVATE void CancelCheckOut( );
 SAL_DLLPRIVATE void CheckIn( );
+SAL_DLLPRIVATE ::com::sun::star::uno::Sequence< 
::com::sun::star::document::CmisVersion > GetCmisVersions();
 };
 
 #define SFX_GLOBAL_CLASSID \
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 084a0f3..fde9aa0 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1321,6 +1322,9 @@ public:
 css::document::CmisProperty >& _cmisproperties )
 throw (css::uno::RuntimeException);
 
+virtual css::uno::Sequence< css::document::CmisVersion > SAL_CALL 
getAllVersions ( )
+throw (css::uno::RuntimeException );
+
 virtual void SAL_CALL checkOut(  ) throw ( css::uno::RuntimeException );
 virtual void SAL_CALL cancelCheckOut(  ) throw ( 
css::uno::RuntimeException );
 virtual void SAL_CALL checkIn( sal_Bool bIsMajor, const OUString & 
rMessage  )
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index be91841..c97bf41 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2160,6 +2160,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/document,\
BrokenPackageRequest \
ChangedByOthersRequest \
CmisProperty \
+   CmisVersion \
CorruptedFilterConfigurationException \
DocumentEvent \
EmptyUndoStackException \
diff --git a/offapi/com/sun/star/document/CmisVersion.idl 
b/offapi/com/sun/star/document/CmisVersion.idl
new file mode 100644
index 000..8171283
--- /dev/null
+++ b/offapi/com/sun/star/document/CmisVersion.idl
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_document_CmisVersion_idl__
+#define __com_sun_star_document_CmisVersion_idl__
+
+#include 
+
+module com {  module sun {  module star {  module document {
+
+/** specifies a CMIS document version.
+ */
+struct CmisVersion
+{
+/** unique ID of the Cmis version
+*/
+stringId;
+
+/** specifies the time when the revision was created.
+ */
+util::DateTimeTimeStamp;
+
+/** contains the author that created the version.
+*/
+stringAuthor;
+
+/** contains the comment the author has left.
+*/
+stringComment;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/

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

2014-08-26 Thread Caolán McNamara
 include/sfx2/templatedlg.hxx  |  172 ++
 include/svtools/helpid.hrc|   10 
 include/svtools/svtools.hrc   |   28 
 include/svtools/templdlg.hxx  |   81 -
 sfx2/inc/pch/precompiled_sfx.hxx  |1 
 sfx2/inc/templatedlg.hxx  |  169 --
 sfx2/source/appl/appopen.cxx  |3 
 sfx2/source/appl/appserv.cxx  |2 
 sfx2/source/doc/objserv.cxx   |2 
 sfx2/source/doc/templatedlg.cxx   |2 
 svtools/source/contnr/DocumentInfoPreview.cxx |1 
 svtools/source/contnr/templwin.cxx| 1682 --
 svtools/source/contnr/templwin.hrc|   15 
 svtools/source/contnr/templwin.hxx|  249 ---
 svtools/source/contnr/templwin.src|  232 ---
 sw/inc/pch/precompiled_sw.hxx |1 
 sw/source/uibase/uiview/view2.cxx |8 
 17 files changed, 184 insertions(+), 2474 deletions(-)

New commits:
commit fe7d0ea6436f9d8468c1729fcae8a0b3339abc44
Author: Caolán McNamara 
Date:   Tue Aug 26 14:00:23 2014 +0100

convert sw use of template manager to new manager

this completes the conversion of resource hosted
dialogs and tabpages to .ui gtkbuilder format

Change-Id: Ic1b49d5560bfa47f287e04918c01daeebba28163

diff --git a/sfx2/inc/templatedlg.hxx b/include/sfx2/templatedlg.hxx
similarity index 97%
rename from sfx2/inc/templatedlg.hxx
rename to include/sfx2/templatedlg.hxx
index 58d18cf..de9dead 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -10,6 +10,9 @@
 #ifndef INCLUDED_SFX2_INC_TEMPLATEDLG_HXX
 #define INCLUDED_SFX2_INC_TEMPLATEDLG_HXX
 
+#include 
+#include 
+
 #include 
 
 #include 
@@ -39,7 +42,7 @@ namespace com {
 }   }   }
 }
 
-class SfxTemplateManagerDlg : public ModelessDialog
+class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public ModelessDialog
 {
 typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*,const 
ThumbnailViewItem*);
 
diff --git a/include/svtools/helpid.hrc b/include/svtools/helpid.hrc
index 6470e0a..d65ae6d 100644
--- a/include/svtools/helpid.hrc
+++ b/include/svtools/helpid.hrc
@@ -24,16 +24,6 @@
 #define HID_FILEDLG_PREVIEW_CB 
"SVT_HID_FILEDLG_PREVIEW_CB"
 #define HID_FILEDLG_STANDARD  
"SVT_HID_FILEDLG_STANDARD"
 
-// Help ids of template dialog
-#define HID_TEMPLATEDLG_DIALOG 
"SVT_HID_TEMPLATEDLG_DIALOG"
-#define HID_TEMPLATEDLG_ICONCTRL   
"SVT_HID_TEMPLATEDLG_ICONCTRL"
-#define HID_TEMPLATEDLG_FILEVIEW   
"SVT_HID_TEMPLATEDLG_FILEVIEW"
-#define HID_TEMPLATEDLG_TB_BACK
"SVT_HID_TEMPLATEDLG_TB_BACK"
-#define HID_TEMPLATEDLG_TB_PREV
"SVT_HID_TEMPLATEDLG_TB_PREV"
-#define HID_TEMPLATEDLG_TB_PRINT   
"SVT_HID_TEMPLATEDLG_TB_PRINT"
-#define HID_TEMPLATEDLG_TB_DOCINFO 
"SVT_HID_TEMPLATEDLG_TB_DOCINFO"
-#define HID_TEMPLATEDLG_TB_PREVIEW 
"SVT_HID_TEMPLATEDLG_TB_PREVIEW"
-
 // Help ids for the filepicker dialogs
 // help ids for fileview contextmenu
 #define HID_FILEVIEW_MENU_DELETE   
"SVT_HID_FILEVIEW_MENU_DELETE"
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 207f2f0..23cf007 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -50,20 +50,8 @@
 #define STR_SVT_ESTIMATED_SIZE_PIX_2(RID_SVTOOLS_START + 40)
 #define STR_SVT_ESTIMATED_SIZE_VEC  (RID_SVTOOLS_START + 41)
 
-// doc template dialog
-#define DLG_DOCTEMPLATE (RID_SVTOOLS_START+50)
 // FREE
-#define STR_SVT_NEWDOC  (RID_SVTOOLS_START+52)
-#define STR_SVT_MYDOCS  (RID_SVTOOLS_START+53)
-#define STR_SVT_TEMPLATES   (RID_SVTOOLS_START+54)
-#define STR_SVT_SAMPLES (RID_SVTOOLS_START+55)
-#define TB_SVT_FILEVIEW (RID_SVTOOLS_START+56)
-#define TB_SVT_FRAMEWIN (RID_SVTOOLS_START+57)
 #define STRARY_SVT_DOCINFO  (RID_SVTOOLS_START+58)
-#define STR_SVT_NEWDOC_HELP (RID_SVTOOLS_START+63)
-#define STR_SVT_MYDOCS_HELP (RID_SVTOOLS_START+64)
-#define STR_SVT_TEMPLATES_HELP  (RID_SVTOOLS_START+65)
-#define STR_SVT_SAMPLES_HELP(RID_SVTOOLS_START+66)
 
 #define STR_BASICKEY_FORMAT_ON  (RID_SVTOOLS_START+103)
 #define STR_BASICKEY_FORMAT_OFF (RID_SVTOOLS_START+104)
@@ -273,22 +261,6 @@
 
 #define IMG_SVT_FOLDER  (RID_SVTOOLS_START + 42)
 
-#define IMG_SVT_NEWDOC  (RID_SVTOOLS_START + 52)
-#define IMG_SVT_MYDOCS  (RID_SVTOOLS_START + 53)
-#define IMG_SVT_TEMPLATES   (RID_SVTOOLS_START + 54)
-#define IMG_SVT_SAMPLES

[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sc/source sd/source sfx2/sdi sfx2/source svx/source sw/source

2014-09-24 Thread Samuel Mehrbrodt
 include/sfx2/app.hxx|1 
 include/sfx2/templdlg.hxx   |   10 -
 officecfg/registry/data/org/openoffice/Office/Views.xcu |6 ---
 sc/source/ui/view/tabvwsh.cxx   |1 
 sd/source/ui/slideshow/slideshowimpl.cxx|1 
 sd/source/ui/view/drvwshrg.cxx  |2 -
 sd/source/ui/view/outlnvsh.cxx  |1 
 sfx2/sdi/frmslots.sdi   |1 
 sfx2/source/appl/appchild.cxx   |   14 
 sfx2/source/appl/appreg.cxx |1 
 sfx2/source/dialog/templdlg.cxx |   16 -
 sfx2/source/inc/templdgi.hxx|3 -
 sfx2/source/view/viewfrm.cxx|   11 ++
 svx/source/sidebar/gallery/GalleryPanel.hxx |   27 
 sw/source/uibase/app/docst.cxx  |8 
 sw/source/uibase/uiview/view0.cxx   |1 
 sw/source/uibase/web/wview.cxx  |1 
 17 files changed, 12 insertions(+), 93 deletions(-)

New commits:
commit 473ed449a4b6f550dc1af47a07c6e0ef243a98b2
Author: Samuel Mehrbrodt 
Date:   Tue Sep 2 00:18:52 2014 +0200

fdo#73151 Always open Styles&Formatting dialog in the sidebar

This removes the floating window for Styles&Formatting as discussed in 
fdo#73151.

Change-Id: I352d27a4d30632dcfda8963c23629e62ab850524
Reviewed-on: https://gerrit.libreoffice.org/11253
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 5c456af..1f1e831 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -175,7 +175,6 @@ public:
 * @param pArgs Takes ownership
 */
 sal_uIntPtr   LoadTemplate( SfxObjectShellLock& xDoc, 
const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = 0 );
-SfxTemplateDialog*  GetTemplateDialog();
 vcl::Window* GetTopWindow() const;
 
 // members
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 4bd6ac4..6e6ed778 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -34,7 +34,6 @@ class SfxTemplateDialog_Impl;
 class SfxTemplateDialog : public SfxDockingWindow
 {
 private:
-friend class SfxTemplateDialogWrapper;
 friend class SfxTemplateDialog_Impl;
 
 SfxTemplateDialog_Impl* pImpl;
@@ -56,15 +55,6 @@ public:
 static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId);
 };
 
-// class SfxTemplateDialogWrapper 
-
-class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
-{
-public:
-SfxTemplateDialogWrapper
-(vcl::Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*);
-SFX_DECL_CHILDWINDOW_WITHID(SfxTemplateDialogWrapper);
-};
 
 // class SfxTemplatePanelControl -
 
diff --git a/officecfg/registry/data/org/openoffice/Office/Views.xcu 
b/officecfg/registry/data/org/openoffice/Office/Views.xcu
index 771ed28..a2c7f43 100644
--- a/officecfg/registry/data/org/openoffice/Office/Views.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Views.xcu
@@ -19,12 +19,6 @@
 
 http://openoffice.org/2001/registry"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:install="http://openoffice.org/2004/installation"; oor:name="Views" 
oor:package="org.openoffice.Office">
   
-
-
-  
-false
-  
-
 
 
   
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 847f3f6..51aaae8 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -54,7 +54,6 @@ void ScTabViewShell::InitInterface_Impl()
 ScResId(RID_OBJECTBAR_TOOLS));
 
 GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
-
GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
 
GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
 
 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index a6ccac9..4704c90 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2482,7 +2482,6 @@ FncGetChildWindowId aShowChildren[] =
 &SvxBmpMaskChildWindow::GetChildWindowId,
 &SvxIMapDlgChildWindow::GetChildWindowId,
 &SvxHlinkDlgWrapper::GetChildWindowId,
-&SfxTemplateDialogWrapper::GetChildWindowId,
 &SfxInfoBarContainerChild::GetChildWindowId
 };
 
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index 

[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sc/source sd/source sfx2/sdi sfx2/source svx/source sw/source

2014-09-25 Thread Stephan Bergmann
 include/sfx2/app.hxx|1 
 include/sfx2/templdlg.hxx   |   10 +
 officecfg/registry/data/org/openoffice/Office/Views.xcu |6 +++
 sc/source/ui/view/tabvwsh.cxx   |1 
 sd/source/ui/slideshow/slideshowimpl.cxx|1 
 sd/source/ui/view/drvwshrg.cxx  |2 +
 sd/source/ui/view/outlnvsh.cxx  |1 
 sfx2/sdi/frmslots.sdi   |1 
 sfx2/source/appl/appchild.cxx   |   14 
 sfx2/source/appl/appreg.cxx |1 
 sfx2/source/dialog/templdlg.cxx |   16 +
 sfx2/source/inc/templdgi.hxx|3 +
 sfx2/source/view/viewfrm.cxx|   11 --
 svx/source/sidebar/gallery/GalleryPanel.hxx |   27 
 sw/source/uibase/app/docst.cxx  |8 
 sw/source/uibase/uiview/view0.cxx   |1 
 sw/source/uibase/web/wview.cxx  |1 
 17 files changed, 93 insertions(+), 12 deletions(-)

New commits:
commit 89ecdc47e14e3be7fe939b5e76985b9531fcfb42
Author: Stephan Bergmann 
Date:   Thu Sep 25 10:58:43 2014 +0200

Revert "fdo#73151 Always open Styles&Formatting dialog in the sidebar"

This reverts commit 473ed449a4b6f550dc1af47a07c6e0ef243a98b2, which made
JunitTest_toolkit_unoapi fail, as
AccessibleDropDownListBox.createTestEnvironment
(qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java) was no 
longer
able to find its AccessilbeRole.COMBO_BOX AccessibleDropDownListBox, which 
it
apparently expected to find in a docked stylist (cf. 
DesktopTools.dockStylist
in AccessibleDropDownListBox.initialize).

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 1f1e831..5c456af 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -175,6 +175,7 @@ public:
 * @param pArgs Takes ownership
 */
 sal_uIntPtr   LoadTemplate( SfxObjectShellLock& xDoc, 
const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = 0 );
+SfxTemplateDialog*  GetTemplateDialog();
 vcl::Window* GetTopWindow() const;
 
 // members
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 6e6ed778..4bd6ac4 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -34,6 +34,7 @@ class SfxTemplateDialog_Impl;
 class SfxTemplateDialog : public SfxDockingWindow
 {
 private:
+friend class SfxTemplateDialogWrapper;
 friend class SfxTemplateDialog_Impl;
 
 SfxTemplateDialog_Impl* pImpl;
@@ -55,6 +56,15 @@ public:
 static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId);
 };
 
+// class SfxTemplateDialogWrapper 
+
+class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
+{
+public:
+SfxTemplateDialogWrapper
+(vcl::Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*);
+SFX_DECL_CHILDWINDOW_WITHID(SfxTemplateDialogWrapper);
+};
 
 // class SfxTemplatePanelControl -
 
diff --git a/officecfg/registry/data/org/openoffice/Office/Views.xcu 
b/officecfg/registry/data/org/openoffice/Office/Views.xcu
index a2c7f43..771ed28 100644
--- a/officecfg/registry/data/org/openoffice/Office/Views.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Views.xcu
@@ -19,6 +19,12 @@
 
 http://openoffice.org/2001/registry"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:install="http://openoffice.org/2004/installation"; oor:name="Views" 
oor:package="org.openoffice.Office">
   
+
+
+  
+false
+  
+
 
 
   
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 51aaae8..847f3f6 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -54,6 +54,7 @@ void ScTabViewShell::InitInterface_Impl()
 ScResId(RID_OBJECTBAR_TOOLS));
 
 GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
+
GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
 
GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
 
 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4704c90..a6ccac9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2482,6 +2482,7 @@ FncGetChildWindowId aShowChildren[] =
 &SvxBmpMaskChildWindow::GetChildWindowId,
 &SvxIMapDlgChildWindow::GetChildWindowId,
 &SvxHlinkDlgWrapper::Get

[Libreoffice-commits] core.git: include/sfx2 offapi/com qadevOOo/objdsc sc/inc sc/source sd/source sfx2/source starmath/source sw/inc sw/source

2013-09-20 Thread Andres Gomez
 include/sfx2/sfxbasemodel.hxx  |5 ++
 offapi/com/sun/star/document/OfficeDocument.idl|   11 +
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv |1 
 qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv|1 
 sc/inc/unonames.hxx|1 
 sc/source/ui/unoobj/docuno.cxx |   17 
+++
 sd/source/ui/inc/unokywds.hxx  |1 
 sd/source/ui/unoidl/unomodel.cxx   |8 +++
 sfx2/source/doc/sfxbasemodel.cxx   |   22 
++
 starmath/source/unomodel.cxx   |   18 
+++-
 sw/inc/unomap.hxx  |1 
 sw/inc/unoprnms.hxx|2 
 sw/source/core/unocore/unomap.cxx  |1 
 sw/source/core/unocore/unoprnms.cxx|5 +-
 sw/source/ui/uno/unotxdoc.cxx  |6 ++
 16 files changed, 98 insertions(+), 3 deletions(-)

New commits:
commit bee6b8f2ba4ea04135bb47e24c520015129aca27
Author: Andres Gomez 
Date:   Tue Sep 17 18:30:17 2013 +0300

uno: new InteropGrabBag UNO prop in OfficeDocument

Added the new InteropGrabBag property to the OfficeDocument service
and modified the JUnit UNO unit tests for it.

Added specific implementation in the sfx2 module for the SfxBaseModel
class.

Added specific inherited implementations in the sc, sd, starmath and
sw modules for the ScModelObj, SdXImpressDocument, SmModel, and
SwXTextDocument classes.

This new property is intended by now for its usage on preserving OOX's
theming although the aim is to be able to re-create the theming in the
future from saved properties.

It could also be used for preserving other attributes for
interoperability among document formats.

Change-Id: Ia822856293c70ae22911afa794e3e38bcaa31f86
Reviewed-on: https://gerrit.libreoffice.org/6000
Reviewed-by: Miklos Vajna 

diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 1ddedc8..084a0f3 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -1411,6 +1411,11 @@ protected:
 /* returns true if the document signatures are valid, otherwise false */
 sal_Bool hasValidSignatures() const;
 
+/* GrabBagItem for interim interop purposes */
+void getGrabBagItem(com::sun::star::uno::Any& rVal) const;
+
+void setGrabBagItem(const com::sun::star::uno::Any& rVal);
+
 
//
 //  private methods
 
//
diff --git a/offapi/com/sun/star/document/OfficeDocument.idl 
b/offapi/com/sun/star/document/OfficeDocument.idl
index 5303ae7..60937f0 100644
--- a/offapi/com/sun/star/document/OfficeDocument.idl
+++ b/offapi/com/sun/star/document/OfficeDocument.idl
@@ -155,6 +155,17 @@ published service OfficeDocument
 may get a different id every time it gets loaded.
 */
 [property, optional, readonly] string RuntimeUID;
+
+/** Grab bag of document properties, used as a string-any map for
+interim interop purposes.
+
+@since LibreOffice 4.2
+
+This property is intentionally not handled by the ODF
+filter. Any member that should be handled there should be
+first moved out from this grab bag to a separate property.
+*/
+[optional, property] sequence 
InteropGrabBag;
 };
 
 
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
index cb7c6d1..2e78dcf 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
@@ -76,6 +76,7 @@
 
"ScModelObj";"com::sun::star::document::OfficeDocument";"AutomaticControlFocus#optional"
 
"ScModelObj";"com::sun::star::document::OfficeDocument";"ApplyFormDesignMode#optional"
 "ScModelObj";"com::sun::star::document::OfficeDocument";"RuntimeUID#optional"
+"ScModelObj";"com::sun::star::document::OfficeDocument";"InteropGrabBag#optional"
 "ScModelObj";"com::sun::star::frame::XModel";"attachResource()"
 "ScModelObj";"com::sun::star::frame::XModel";"getURL()"
 "ScModelObj";"com::sun::star::frame::XModel";"getArgs()"
diff --git a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv 
b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv
index fd2b766..6eb60af 100644
--- a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocu

[Libreoffice-commits] core.git: include/sfx2 include/svl sc/inc sc/source sd/inc sd/source sfx2/source svl/source sw/inc sw/source

2014-05-28 Thread Caolán McNamara
 include/sfx2/mgetempl.hxx |1 -
 include/svl/style.hxx |9 +++--
 sc/inc/stlsheet.hxx   |2 +-
 sc/source/core/data/stlsheet.cxx  |4 ++--
 sd/inc/stlsheet.hxx   |2 +-
 sd/source/core/drawdoc4.cxx   |1 -
 sd/source/core/stlpool.cxx|   12 +++-
 sd/source/core/stlsheet.cxx   |8 ++--
 sfx2/source/dialog/mgetempl.cxx   |   14 +++---
 svl/source/items/style.cxx|4 +++-
 sw/inc/docstyle.hxx   |2 +-
 sw/source/uibase/app/docstyle.cxx |4 ++--
 12 files changed, 29 insertions(+), 34 deletions(-)

New commits:
commit 05e2fd162ef86ebe4ea2a2a679cabeae33e844f0
Author: Caolán McNamara 
Date:   Wed May 28 13:23:52 2014 +0100

Related: fdo#79142 make SetName default to Reindexing

Change-Id: I408042bc7bf1a5a955203d65d2c68ebf9527b9b5

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 085da93..6082fbe 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -54,7 +54,6 @@ class SfxManageStyleSheetPage : public SfxTabPage
 
 SfxStyleSheetBase *pStyle;
 SfxStyleFamilies *pFamilies;
-SfxStyleSheetBasePool *pPool;
 const SfxStyleFamilyItem *pItem;
 OUString aBuf;
 bool bModified;
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 493ba24..f82d142 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -105,8 +105,13 @@ public:
 // returns the internal name of this style
 virtual const OUString& GetName() const;
 
-// sets the internal name of this style
-virtual bool SetName( const OUString& );
+// sets the internal name of this style.
+//
+// If the name of a style is changed, then the styles container needs to be
+// reindexed (see IndexedStyleSheets). If you set bReindexNow to false to
+// defer that indexing, then you must call the Reindex manually on the
+// SfxStyleSheetBasePool parent.
+virtual bool SetName(const OUString& rNewName, bool bReindexNow = true);
 
 /** returns the display name of this style, it is used at the user 
interface.
 If the display name is empty, this method returns the internal name. */
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index 71e6a4b..f242535 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -57,7 +57,7 @@ public:
 virtual const OUString& GetParent() const SAL_OVERRIDE;
 virtual const OUString& GetFollow() const SAL_OVERRIDE;
 
-virtual bool SetName( const OUString& ) SAL_OVERRIDE;
+virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) 
SAL_OVERRIDE;
 
 voidSetUsage( ScStyleSheet::Usage eUse ) const
 { eUsage = eUse; }
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 0e7fd7c..cac09e9 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -303,13 +303,13 @@ const OUString& ScStyleSheet::GetFollow() const
 //! Flag gesetzt und abgefragt werden.
 //! Die ganze Abfrage muss raus, wenn fuer eine neue Datei-Version die 
Namens-Umsetzung wegfaellt.
 
-bool ScStyleSheet::SetName( const OUString& rNew )
+bool ScStyleSheet::SetName(const OUString& rNew, bool bReindexNow)
 {
 OUString aFileStdName = OUString(STRING_STANDARD);
 if ( rNew == aFileStdName && aFileStdName != 
ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
 return false;
 else
-return SfxStyleSheet::SetName( rNew );
+return SfxStyleSheet::SetName(rNew, bReindexNow);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index cad63a7..0811142 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -60,7 +60,7 @@ public:
 virtual boolHasFollowSupport() const SAL_OVERRIDE;
 virtual boolHasParentSupport() const SAL_OVERRIDE;
 virtual boolHasClearParentSupport() const SAL_OVERRIDE;
-virtual boolSetName( const OUString& ) SAL_OVERRIDE;
+virtual boolSetName(const OUString& rNewName, bool bReindexNow = 
true) SAL_OVERRIDE;
 virtual voidSetHelpId( const OUString& r, sal_uLong nId ) 
SAL_OVERRIDE;
 
 voidAdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = 
true);
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 061ac8d..c2e5f57 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1103,7 +1103,6 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& 
rOldLayoutName, const
 aReplList.push_back(aReplData);
 
 pSheet->SetName(aSheetName);
-mxStyleSheetPool.get()->Reindex();
 }
 
 pSheet = aIter.Next();
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 0c7fff4..3d1ee56 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@