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

2019-08-01 Thread Matthias Seidel (via logerrit)
 sfx2/source/sidebar/Theme.cxx |   78 ++
 1 file changed, 4 insertions(+), 74 deletions(-)

New commits:
commit 7840d0ed4deb047f5977f258deb69d0a4ddb9918
Author: Matthias Seidel 
AuthorDate: Thu Aug 1 08:19:41 2019 +
Commit: Matthias Seidel 
CommitDate: Thu Aug 1 08:19:41 2019 +

Add close button for high contrast in side bar

diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 75dfa3e91dc9..dd0739a3fdd6 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -41,8 +41,6 @@ namespace sfx2 { namespace sidebar {
 ::rtl::Reference Theme::mpInstance;
 
 
-
-
 Theme& Theme::GetCurrentTheme (void)
 {
 if ( ! mpInstance.is())
@@ -54,8 +52,6 @@ Theme& Theme::GetCurrentTheme (void)
 }
 
 
-
-
 Theme::Theme (void)
 : ThemeInterfaceBase(m_aMutex),
   maImages(),
@@ -76,15 +72,11 @@ Theme::Theme (void)
 }
 
 
-
-
 Theme::~Theme (void)
 {
 }
 
 
-
-
 Image Theme::GetImage (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -95,8 +87,6 @@ Image Theme::GetImage (const ThemeItem eItem)
 }
 
 
-
-
 Color Theme::GetColor (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -112,8 +102,6 @@ Color Theme::GetColor (const ThemeItem eItem)
 }
 
 
-
-
 const Paint& Theme::GetPaint (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -124,16 +112,12 @@ const Paint& Theme::GetPaint (const ThemeItem eItem)
 }
 
 
-
-
 const Wallpaper Theme::GetWallpaper (const ThemeItem eItem)
 {
 return GetPaint(eItem).GetWallpaper();
 }
 
 
-
-
 sal_Int32 Theme::GetInteger (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -144,8 +128,6 @@ sal_Int32 Theme::GetInteger (const ThemeItem eItem)
 }
 
 
-
-
 bool Theme::GetBoolean (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -156,8 +138,6 @@ bool Theme::GetBoolean (const ThemeItem eItem)
 }
 
 
-
-
 Rectangle Theme::GetRectangle (const ThemeItem eItem)
 {
 const PropertyType eType (GetPropertyType(eItem));
@@ -168,8 +148,6 @@ Rectangle Theme::GetRectangle (const ThemeItem eItem)
 }
 
 
-
-
 bool Theme::IsHighContrastMode (void)
 {
 const Theme& rTheme (GetCurrentTheme());
@@ -177,8 +155,6 @@ bool Theme::IsHighContrastMode (void)
 }
 
 
-
-
 void Theme::HandleDataChange (void)
 {
 Theme& rTheme (GetCurrentTheme());
@@ -194,8 +170,6 @@ void Theme::HandleDataChange (void)
 }
 
 
-
-
 void Theme::InitializeTheme (void)
 {
 setPropertyValue(
@@ -207,8 +181,6 @@ void Theme::InitializeTheme (void)
 }
 
 
-
-
 void Theme::UpdateTheme (void)
 {
 SidebarResource aLocalResource;
@@ -385,7 +357,10 @@ void Theme::UpdateTheme (void)
 : 
A2S("private:graphicrepository/sfx2/res/symphony/morebutton.png")));
 setPropertyValue(
 maPropertyIdToNameMap[Image_Closer],
-Any(A2S("private:graphicrepository/sfx2/res/closedoc.png")));
+Any(
+mbIsHighContrastMode
+? A2S("private:graphicrepository/sfx2/res/closedochc.png")
+: A2S("private:graphicrepository/sfx2/res/closedoc.png")));
 setPropertyValue(
 maPropertyIdToNameMap[Image_CloseIndicator],
 Any(
@@ -473,8 +448,6 @@ void Theme::UpdateTheme (void)
 }
 
 
-
-
 void SAL_CALL Theme::disposing (void)
 {
 ChangeListeners aListeners;
@@ -506,16 +479,12 @@ void SAL_CALL Theme::disposing (void)
 }
 
 
-
-
 Reference Theme::GetPropertySet (void)
 {
 return 
Reference(static_cast(()), 
UNO_QUERY);
 }
 
 
-
-
 Reference SAL_CALL Theme::getPropertySetInfo (void)
 throw(cssu::RuntimeException)
 {
@@ -523,8 +492,6 @@ Reference SAL_CALL 
Theme::getPropertySetInfo (void)
 }
 
 
-
-
 void SAL_CALL Theme::setPropertyValue (
 const ::rtl::OUString& rsPropertyName,
 const cssu::Any& rValue)
@@ -570,8 +537,6 @@ void SAL_CALL Theme::setPropertyValue (
 }
 
 
-
-
 Any SAL_CALL Theme::getPropertyValue (
 const ::rtl::OUString& rsPropertyName)
 throw(css::beans::UnknownPropertyException,
@@ -592,8 +557,6 @@ Any SAL_CALL Theme::getPropertyValue (
 }
 
 
-
-
 void SAL_CALL Theme::addPropertyChangeListener(
 const ::rtl::OUString& rsPropertyName,
 const cssu::Reference& rxListener)
@@ -620,8 +583,6 @@ void SAL_CALL Theme::addPropertyChangeListener(
 }
 
 
-
-
 void SAL_CALL Theme::removePropertyChangeListener(
 const ::rtl::OUString& rsPropertyName,
 const cssu::Reference& rxListener)
@@ -658,8 +619,6 @@ void SAL_CALL Theme::removePropertyChangeListener(
 }
 
 
-
-
 void SAL_CALL Theme::addVetoableChangeListener(
 const ::rtl::OUString& rsPropertyName,
 const cssu::Reference& rxListener)
@@ -686,8 +645,6 @@ void SAL_CALL Theme::addVetoableChangeListener(
 }
 
 
-
-
 void SAL_CALL Theme::removeVetoableChangeListener(
 const ::rtl::OUString& rsPropertyName,
 const 

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

2019-07-31 Thread Matthias Seidel (via logerrit)
 sfx2/source/sidebar/Sidebar.src |  128 
 sfx2/source/sidebar/Theme.cxx   |   12 +--
 2 files changed, 70 insertions(+), 70 deletions(-)

New commits:
commit b953e761e3527193baf421a27f6048b06cc26c0a
Author: Matthias Seidel 
AuthorDate: Wed Jul 31 18:49:25 2019 +
Commit: Matthias Seidel 
CommitDate: Wed Jul 31 18:49:25 2019 +

Cleaned up whitespace. Use correct icon for high contrast.

diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index f47a895550fe..ce1230f61163 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -27,286 +27,286 @@ Resource RID_SIDEBAR_RESOURCE
 {
 Image IMAGE_SIDEBAR_PLUS
 {
-ImageBitmap = Bitmap { File = "plus.png" ;};
+ImageBitmap = Bitmap { File = "plus.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_PLUS_HC
 {
-ImageBitmap = Bitmap { File = "plus_hc.png" ;};
+ImageBitmap = Bitmap { File = "plus_hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_MINUS
 {
-ImageBitmap = Bitmap { File = "minus.png" ;};
+ImageBitmap = Bitmap { File = "minus.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_MINUS_HC
 {
-ImageBitmap = Bitmap { File = "minus_hc.png" ;};
+ImageBitmap = Bitmap { File = "minus_hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_GRIP
 {
-ImageBitmap = Bitmap { File = "grip.png" ;};
+ImageBitmap = Bitmap { File = "grip.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_GRIP_HC
 {
-ImageBitmap = Bitmap { File = "grip_hc.png" ;};
+ImageBitmap = Bitmap { File = "grip_hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_MENU
 {
-ImageBitmap = Bitmap { File = "symphony/open_more.png" ;};
+ImageBitmap = Bitmap { File = "symphony/open_more.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_MENU_HC
 {
-ImageBitmap = Bitmap { File = "symphony/open_more_hc.png" ;};
+ImageBitmap = Bitmap { File = "symphony/open_more_hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_DETAIL_DIALOG
 {
-ImageBitmap = Bitmap { File = "symphony/morebutton.png" ;};
+ImageBitmap = Bitmap { File = "symphony/morebutton.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_DETAIL_DIALOG_HC
 {
-ImageBitmap = Bitmap { File = "symphony/morebutton_h.png" ;};
+ImageBitmap = Bitmap { File = "symphony/morebutton_h.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_TOOLBOX_SEPARATOR
 {
-ImageBitmap = Bitmap { File = "separator.png" ;};
+ImageBitmap = Bitmap { File = "separator.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_DECK_3D_LARGE
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large.png" ;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large.png" ;} ;
 };
 Image IMAGE_SIDEBAR_DECK_3D_LARGE_HC
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large-hc.png" ;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large-hc.png" ;} ;
 };
 Image IMAGE_SIDEBAR_DECK_3D_SMALL
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-3d-small.png" ;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-3d-small.png" ;} ;
 };
 Image IMAGE_SIDEBAR_DECK_3D_SMALL_HC
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-3d-small-hc.png" ;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-3d-small-hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_DECK_ANIMATION_LARGE
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-animation-large.png" 
;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-animation-large.png" 
;} ;
 };
 Image IMAGE_SIDEBAR_DECK_ANIMATION_LARGE_HC
 {
-ImageBitmap = Bitmap { File = 
"symphony/sidebar-animation-large-hc.png" ;};
+ImageBitmap = Bitmap { File = 
"symphony/sidebar-animation-large-hc.png" ;} ;
 };
 Image IMAGE_SIDEBAR_DECK_ANIMATION_SMALL
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-animation-small.png" 
;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-animation-small.png" 
;} ;
 };
 Image IMAGE_SIDEBAR_DECK_ANIMATION_SMALL_HC
 {
-ImageBitmap = Bitmap { File = 
"symphony/sidebar-animation-small-hc.png" ;};
+ImageBitmap = Bitmap { File = 
"symphony/sidebar-animation-small-hc.png" ;} ;
 };
 
 Image IMAGE_SIDEBAR_DECK_COLORS_LARGE
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-colors-large.png" ;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-colors-large.png" ;} ;
 };
 Image IMAGE_SIDEBAR_DECK_COLORS_LARGE_HC
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-colors-large-hc.png" 
;};
+ImageBitmap = Bitmap { File = "symphony/sidebar-colors-large-hc.png" 
;} ;
 };
 Image IMAGE_SIDEBAR_DECK_COLORS_SMALL
 {
-ImageBitmap = Bitmap { File = "symphony/sidebar-colors-small.png" ;};
+ImageBitmap = Bitmap { 

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

2018-07-28 Thread Libreoffice Gerrit user
 sfx2/source/appl/newhelp.src |  212 ---
 1 file changed, 83 insertions(+), 129 deletions(-)

New commits:
commit a3c6f1476a3d434bd4a209d80c748d5aeb281e5c
Author: Matthias Seidel 
AuthorDate: Sat Jul 28 12:54:44 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Jul 28 12:54:44 2018 +

Cleaned up resource file for Help.

Removed entries for MASKCOLOR_MAGENTA.
The graphics were changed from BMP to PNG with transparency layer long ago. 
No need for masking a special color as transparent anymore.

diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src
index 2adf3e2ec306..ec3ce3316c31 100644
--- a/sfx2/source/appl/newhelp.src
+++ b/sfx2/source/appl/newhelp.src
@@ -28,21 +28,21 @@
 Window WIN_HELPINDEX
 {
 Hide = TRUE ;
-Size = MAP_APPFONT ( 120 , 200 ) ;
+Size = MAP_APPFONT ( 120, 200 ) ;
 DialogControl = TRUE;
 ListBox LB_ACTIVE
 {
 HelpId = HID_HELP_LISTBOX;
 Border = TRUE ;
 DropDown = TRUE;
-Pos = MAP_APPFONT ( 3 , 3 ) ;
-Size = MAP_APPFONT ( 114 , 40 ) ;
+Pos = MAP_APPFONT ( 3, 3 ) ;
+Size = MAP_APPFONT ( 114, 40 ) ;
 };
 FixedLine FL_ACTIVE
 {
 Hide = True;
 Pos = MAP_APPFONT ( 2, 19 ) ;
-Size = MAP_APPFONT ( 118 , 1 ) ;
+Size = MAP_APPFONT ( 118, 1 ) ;
 };
 TabControl TC_INDEX
 {
@@ -80,25 +80,25 @@ TabPage TP_HELP_INDEX
 HelpId = HID_HELP_TABPAGE_INDEX;
 Hide = TRUE ;
 DialogControl = TRUE;
-Size = MAP_APPFONT ( 120 , 200 ) ;
+Size = MAP_APPFONT ( 120, 200 ) ;
 FixedText FT_EXPRESSION
 {
-Pos = MAP_APPFONT ( 6 , 6 ) ;
-Size = MAP_APPFONT ( 108 , 10 ) ;
+Pos = MAP_APPFONT ( 6, 6 ) ;
+Size = MAP_APPFONT ( 108, 10 ) ;
 Text [ en-US ] = "~Search term" ;
 };
 ComboBox CB_INDEX
 {
 HelpID = "sfx2:ComboBox:TP_HELP_INDEX:CB_INDEX";
 Border = TRUE ;
-Pos = MAP_APPFONT ( 6 , 17 ) ;
-Size = MAP_APPFONT ( 108 , 97 ) ;
+Pos = MAP_APPFONT ( 6, 17 ) ;
+Size = MAP_APPFONT ( 108, 97 ) ;
 };
 PushButton PB_OPEN_INDEX
 {
 HelpID = "sfx2:PushButton:TP_HELP_INDEX:PB_OPEN_INDEX";
-Pos = MAP_APPFONT ( 64 , 115 ) ;
-Size = MAP_APPFONT ( 50 , 14 ) ;
+Pos = MAP_APPFONT ( 64, 115 ) ;
+Size = MAP_APPFONT ( 50, 14 ) ;
 Text [ en-US ] = "~Display" ;
 };
 };
@@ -108,11 +108,11 @@ TabPage TP_HELP_SEARCH
 HelpId = HID_HELP_TABPAGE_SEARCH;
 Hide = TRUE ;
 DialogControl = TRUE;
-Size = MAP_APPFONT ( 140 , 122 ) ;
+Size = MAP_APPFONT ( 140, 122 ) ;
 FixedText FT_SEARCH
 {
-Pos = MAP_APPFONT ( 6 , 6 ) ;
-Size = MAP_APPFONT ( 128 , 10 ) ;
+Pos = MAP_APPFONT ( 6, 6 ) ;
+Size = MAP_APPFONT ( 128, 10 ) ;
 Text [ en-US ] = "S~earch term" ;
 };
 ComboBox ED_SEARCH
@@ -120,42 +120,42 @@ TabPage TP_HELP_SEARCH
 HelpID = "sfx2:ComboBox:TP_HELP_SEARCH:ED_SEARCH";
 Border = TRUE ;
 DropDown = TRUE;
-Pos = MAP_APPFONT ( 6 , 17 ) ;
-Size = MAP_APPFONT ( 92 , 40 ) ;
+Pos = MAP_APPFONT ( 6, 17 ) ;
+Size = MAP_APPFONT ( 92, 40 ) ;
 };
 PushButton PB_SEARCH
 {
 HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_SEARCH";
-Pos = MAP_APPFONT ( 101 , 17 ) ;
-Size = MAP_APPFONT ( 50 , 14 ) ;
+Pos = MAP_APPFONT ( 101, 17 ) ;
+Size = MAP_APPFONT ( 50, 14 ) ;
 Text [ en-US ] = "~Find";
 };
 CheckBox CB_FULLWORDS
 {
 HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_FULLWORDS";
 Pos = MAP_APPFONT ( 6, 34 ) ;
-Size = MAP_APPFONT ( 128 , 10 ) ;
+Size = MAP_APPFONT ( 128, 10 ) ;
 Text [ en-US ] = "~Complete words only";
 };
 CheckBox CB_SCOPE
 {
 HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_SCOPE";
 Pos = MAP_APPFONT ( 6, 47 ) ;
-Size = MAP_APPFONT ( 128 , 10 ) ;
+Size = MAP_APPFONT ( 128, 10 ) ;
 Text [ en-US ] = "Find in ~headings only";
 };
 ListBox LB_RESULT
 {
 HelpID = "sfx2:ListBox:TP_HELP_SEARCH:LB_RESULT";
 Border = TRUE ;
-Pos = MAP_APPFONT ( 6 , 60 ) ;
-Size = MAP_APPFONT ( 128 , 30 ) ;
+Pos = MAP_APPFONT ( 6, 60 ) ;
+Size = MAP_APPFONT ( 128, 30 ) ;
 };
 PushButton PB_OPEN_SEARCH
 {
 HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_OPEN_SEARCH";
-Pos = MAP_APPFONT ( 84 , 182 ) ;
-Size = MAP_APPFONT ( 50 , 14 ) ;
+Pos = MAP_APPFONT ( 84, 182 ) ;
+Size = MAP_APPFONT ( 50, 14 ) ;
 Text [ en-US ] = "~Display" ;
 };
 };
@@ -165,11 +165,11 @@ TabPage TP_HELP_BOOKMARKS
 HelpId = HID_HELP_TABPAGE_BOOKMARKS;
 Hide = TRUE ;
 DialogControl = TRUE;
-Size = MAP_APPFONT ( 120 , 200 ) ;
+Size = MAP_APPFONT ( 120, 200 ) ;
 FixedText FT_BOOKMARKS
 

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

2018-02-09 Thread Matthias Seidel
 sfx2/source/appl/app.src  |2 +-
 sfx2/source/view/view.src |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ccbbf475f7f88d8b1a5a79f5c5fddb79eefeee19
Author: Matthias Seidel 
Date:   Fri Feb 9 23:24:46 2018 +

Fixed whitespace

diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 73e07501fb65..301960db56e7 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -75,7 +75,7 @@ ErrorBox MSG_ERR_NO_WEBBROWSER_FOUND
 {
 BUTTONS = WB_OK ;
 DEFBUTTON = WB_DEF_OK ;
-Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your 
system. Please check your Desktop Preferences or install a web browser (for 
example, Mozilla) in the default  location requested during the browser 
installation." ;
+Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your 
system. Please check your desktop preferences or install a web browser (for 
example, Mozilla) in the default location requested during the browser 
installation." ;
 };
 
 Resource SID_UNKNOWN
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index 02c23d16e642..3765133aeab3 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -171,7 +171,7 @@ ErrorBox MSG_ERROR_NO_WEBBROWSER_FOUND
 {
 BUTTONS = WB_OK ;
 DEFBUTTON = WB_DEF_OK ;
-Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your 
system. Please check your Desktop Preferences or install a web browser (for 
example, Mozilla) in the default  location requested during the browser 
installation." ;
+Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your 
system. Please check your desktop preferences or install a web browser (for 
example, Mozilla) in the default location requested during the browser 
installation." ;
 };
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-11 Thread pats
 sfx2/source/appl/linkmgr2.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit c04136353ebde071d27697c953c791896beaaf9e
Author: pats 
Date:   Sun Nov 12 00:12:55 2017 +

#127581# Writer crashes after copying all content

diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 80795e68b206..494f8c2019a1 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -159,9 +159,13 @@ sal_Bool LinkManager::Insert( SvBaseLink* pLink )
 SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
 pLink->SetLinkManager( this );
 aLinkTbl.Insert( pTmp, aLinkTbl.Count() );
-Window *parent = GetPersist()->GetDialogParent();
 if (mAutoAskUpdateAllLinks)
 {
+Window *parent = NULL;
+SfxObjectShell* persist = GetPersist();
+if (persist != NULL)
+parent = GetPersist()->GetDialogParent();
+
 SetUserAllowsLinkUpdate(pLink, GetUserAllowsLinkUpdate(parent));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-20 Thread Damjan Jovanovic
 sfx2/source/bastyp/mieclip.cxx |   23 ++-
 1 file changed, 18 insertions(+), 5 deletions(-)

New commits:
commit ae698a63b640b708a41022fdc39ef8ec7c76d3cd
Author: Damjan Jovanovic 
Date:   Thu Oct 20 15:47:11 2016 +

#i83004# cannot paste HTML data from any Java application via clipboard

Allow StartHTML and EndHTML values in the Windows clipboard's
"HTML Format" to be -1, and use StartFragment and EndFragment instead
when they are. Excel allows -1, as does Mozilla since 2011, so we
really should too. Java has been providing >= 0 for a while now, but
we should still support -1 in case any other applications use it.

Patch by: me

diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index bcea749..8a7038b 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -44,7 +44,8 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
 delete pStrm, pStrm = 0;
 
 ByteString sLine, sVersion;
-sal_uIntPtr nStt = 0, nEnd = 0;
+sal_Int32 nStt = -1, nEnd = -1;
+sal_Int32 nStartFragment = 0, nEndFragment = 0;
 sal_uInt16 nIndex = 0;
 
 rStream.Seek(STREAM_SEEK_TO_BEGIN);
@@ -59,14 +60,26 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& 
rStream )
 nIndex = 0;
 ByteString sTmp( sLine.GetToken( 0, ':', nIndex ) );
 if( sTmp == "StartHTML" )
-nStt = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
+nStt = sLine.Erase( 0, nIndex ).ToInt32();
 else if( sTmp == "EndHTML" )
-nEnd = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
+nEnd = sLine.Erase( 0, nIndex ).ToInt32();
+else if( sTmp == "StartFragment" )
+{
+nStartFragment = sLine.Erase( 0, nIndex ).ToInt32();
+if( nStt == -1 )
+nStt = nStartFragment;
+}
+else if( sTmp == "EndFragment" )
+{
+nEndFragment = sLine.Erase( 0, nIndex ).ToInt32();
+if (nEnd == -1 )
+nEnd = nEndFragment;
+}
 else if( sTmp == "SourceURL" )
 sBaseURL = String( sLine.Erase( 0, nIndex ), 
RTL_TEXTENCODING_UTF8);
 
-if( nEnd && nStt &&
-( sBaseURL.Len() || rStream.Tell() >= nStt ))
+if( nEnd >= 0 && nStt >= 0 &&
+( sBaseURL.Len() || rStream.Tell() >= (sal_uInt32)nStt ))
 {
 bRet = sal_True;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-14 Thread Herbert Dürr
 sfx2/source/appl/impldde.cxx |   72 ++-
 1 file changed, 11 insertions(+), 61 deletions(-)

New commits:
commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0
Author: Herbert Dürr h...@apache.org
Date:   Mon Jul 14 07:17:59 2014 +

#i125226# expect DDE servers to be already up

soffice is always up anyway and other DDE apps should be started manually

diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 3fbcaa7..8add5c2 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -209,9 +209,6 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any  
rData /*out param*/,
 
 sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
 {
-#if defined(WNT)
-static sal_Bool bInWinExec = sal_False;
-#endif
 sal_uInt16 nLinkType = pSvLink-GetUpdateMode();
 if( pConnection )   // Verbindung steht ja schon
 {
@@ -238,69 +235,22 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
 pConnection = new DdeConnection( sServer, sTopic );
 if( pConnection-GetError() )
 {
-// kann man denn das System-Topic ansprechen ?
-// dann ist der Server oben, kennt nur nicht das Topic!
-if( sTopic.EqualsIgnoreCaseAscii( SYSTEM ) )
+// check if the DDE server knows the SYSTEM topic
+bool bSysTopic = false;
+if( !sTopic.EqualsIgnoreCaseAscii( SYSTEM ))
 {
-sal_Bool bSysTopic;
-{
-DdeConnection aTmp( sServer, String::CreateFromAscii( 
RTL_CONSTASCII_STRINGPARAM( SYSTEM ) ) );
-bSysTopic = !aTmp.GetError();
-}
-
-if( bSysTopic )
-{
-nError = DDELINK_ERROR_DATA;
-return sal_False;
-}
-// ansonsten unter Win/WinNT die Applikation direkt starten
+DdeConnection aTmp( sServer, String::CreateFromAscii( 
RTL_CONSTASCII_STRINGPARAM( SYSTEM ) ) );
+bSysTopic = !aTmp.GetError();
 }
 
-#if defined(WNT)
-// check the suitability of starting the DDE server
-const SvtSecurityOptions aSecOpts;
-bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
-bForbidden |= (sServer.SearchChar( L:./%\\) != STRING_NOTFOUND);
-static const char* aBadServers[] = { cmd, rundll32 };
-for( int i = 0; i  sizeof(aBadServers)/sizeof(*aBadServers); ++i)
-bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) 
== COMPARE_EQUAL);
-
-// try to start the DDE server if it is not there already
-bForbidden |= (bInWinExec != sal_False);
-if( !bForbidden )
+if( bSysTopic )
 {
-ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
-aCmdLine.Append( .exe  );
-aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) );
-
-if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED )  32 ) // 
TODO: use CreateProcess() instead
-nError = DDELINK_ERROR_APP;
-else
-{
-sal_uInt16 i;
-for( i=0; i5; i++ )
-{
-bInWinExec = sal_True;
-Application::Reschedule();
-bInWinExec = sal_False;
-
-delete pConnection;
-pConnection = new DdeConnection( sServer, sTopic );
-if( !pConnection-GetError() )
-break;
-}
-
-if( i == 5 )
-{
-nError = DDELINK_ERROR_APP;
-}
-}
-}
-else
-#endif  // WNT
-{
-nError = DDELINK_ERROR_APP;
+// if the system topic works then the server is up but just 
doesn't know the original topic
+nError = DDELINK_ERROR_DATA;
+return sal_False;
 }
+
+nError = DDELINK_ERROR_APP;
 }
 
 if( LINKUPDATE_ALWAYS == nLinkType  !pLink  !pConnection-GetError() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-10 Thread Herbert Dürr
 sfx2/source/appl/impldde.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4
Author: Herbert Dürr h...@apache.org
Date:   Thu Jul 10 09:11:07 2014 +

#i125226# disallow absolute and relative paths for DDE servers

diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 76981f9..3fbcaa7 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -260,19 +260,20 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
 // check the suitability of starting the DDE server
 const SvtSecurityOptions aSecOpts;
 bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
-bForbidden |= (bInWinExec != sal_False);
+bForbidden |= (sServer.SearchChar( L:./%\\) != STRING_NOTFOUND);
 static const char* aBadServers[] = { cmd, rundll32 };
 for( int i = 0; i  sizeof(aBadServers)/sizeof(*aBadServers); ++i)
-bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) 
== COMPARE_EQUAL );
+bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) 
== COMPARE_EQUAL);
 
 // try to start the DDE server if it is not there already
+bForbidden |= (bInWinExec != sal_False);
 if( !bForbidden )
 {
 ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
 aCmdLine.Append( .exe  );
 aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) );
 
-if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED )  32 )
+if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED )  32 ) // 
TODO: use CreateProcess() instead
 nError = DDELINK_ERROR_APP;
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-09 Thread Herbert Dürr
 sfx2/source/appl/impldde.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 727ea069c6342e01a50c8b068ec302574b251cbd
Author: Herbert Dürr h...@apache.org
Date:   Wed Jul 9 21:14:50 2014 +

#i125226# typo fix

diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 8bc1cb6..76981f9 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -259,7 +259,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
 #if defined(WNT)
 // check the suitability of starting the DDE server
 const SvtSecurityOptions aSecOpts;
-bool bForbidden = (aSecOpts.GetMacroSecurityLevel() != eNEVER_EXECUTE);
+bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
 bForbidden |= (bInWinExec != sal_False);
 static const char* aBadServers[] = { cmd, rundll32 };
 for( int i = 0; i  sizeof(aBadServers)/sizeof(*aBadServers); ++i)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

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

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

Patch by: hanya
Review by: orw

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


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

2014-04-15 Thread Armin Le Grand
 sfx2/source/dialog/tabdlg.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6abb7270a6cab2e3955e06b56dcf5d28becc7e18
Author: Armin Le Grand a...@apache.org
Date:   Tue Apr 15 09:20:07 2014 +

i124638 As a first step, avoid crash when a TabPage is not found for a 
TabDialog, assert this

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 78a0fd5..87eaecd 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1406,10 +1406,11 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, 
pTabCtrl )
 // fallback to 1st page when requested one does not exist
 if(!pDataObject  pTabCtrl-GetPageCount())
 {
+OSL_ENSURE(false, Requested TabPage not found in the TabDialog, 
fallback to 1st page (!));
 pTabCtrl-SetCurPageId(pTabCtrl-GetPageId(0));
 nId = pTabCtrl-GetCurPageId();
 pTabPage = dynamic_cast SfxTabPage* (pTabCtrl-GetTabPage(nId));
-Data_Impl* pDataObject = Find(*pImpl-pData, nId);
+pDataObject = Find(*pImpl-pData, nId);
 }
 
 DBG_ASSERT( pDataObject, Id nicht bekannt );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-16 Thread Armin Le Grand
 sfx2/source/appl/fileobj.cxx|4 +++-
 svgio/source/svgreader/svgimagenode.cxx |   29 -
 svx/source/svdraw/svdograf.cxx  |   10 --
 3 files changed, 31 insertions(+), 12 deletions(-)

New commits:
commit bc89d402b3df00c2402ac86896eb2ce4c3f7b7d0
Author: Armin Le Grand a...@apache.org
Date:   Fri Jan 17 01:37:00 2014 +

i123042 corrected reload of linked content to have access to it's own path

diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 07db70a..7a1575b 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -349,7 +349,9 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic rGrf, 
SvStream* pStream )
 else if( !pDownLoadData )
 {
 pStream-Seek( STREAM_SEEK_TO_BEGIN );
-nRes = pGF-ImportGraphic( rGrf, aEmptyStr, *pStream, nFilter );
+
+// #123042# for e.g. SVG the path is needed, see same TaskID in svx 
for more info
+nRes = pGF-ImportGraphic( rGrf, sFileNm, *pStream, nFilter );
 }
 else
 {
diff --git a/svgio/source/svgreader/svgimagenode.cxx 
b/svgio/source/svgreader/svgimagenode.cxx
index 5851896..a4646e7 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -241,21 +241,32 @@ namespace svgio
 else if(maUrl.getLength())
 {
 const rtl::OUString rPath = 
getDocument().getAbsolutePath();
-const rtl::OUString 
aAbsUrl(rtl::Uri::convertRelToAbs(rPath, maUrl));
 
-if(aAbsUrl.getLength())
+if(rPath.getLength())
 {
-SvFileStream aStream(aAbsUrl, STREAM_STD_READ);
-Graphic aGraphic;
+const rtl::OUString 
aAbsUrl(rtl::Uri::convertRelToAbs(rPath, maUrl));
 
-if(GRFILTER_OK == 
GraphicFilter::GetGraphicFilter()-ImportGraphic(
-aGraphic,
-aAbsUrl,
-aStream))
+if(aAbsUrl.getLength())
 {
-extractFromGraphic(aGraphic, aNewTarget, 
aViewBox, aBitmapEx);
+SvFileStream aStream(aAbsUrl, STREAM_STD_READ);
+Graphic aGraphic;
+
+if(GRFILTER_OK == 
GraphicFilter::GetGraphicFilter()-ImportGraphic(
+aGraphic,
+aAbsUrl,
+aStream))
+{
+extractFromGraphic(aGraphic, aNewTarget, 
aViewBox, aBitmapEx);
+}
 }
 }
+else
+{
+// #123042# detect missing path and assert - 
content will be missing. The
+// absolute path to itself needs to be set to 
correctly import linked
+// content in a SVG file
+OSL_ENSURE(false, SVG graphic with internal links 
is interpreted, but local AbsolutePath is not set: linked content will be 
missing (!));
+}
 }
 else if(maXLink.getLength())
 {
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 81daa7a..84685b4 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -135,7 +135,6 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, 
const String aFilter
 ? pGF-GetImportFormatNumber( aFilterName )
 : GRFILTER_FORMAT_DONTKNOW;
 
-String aEmptyStr;
 com::sun::star::uno::Sequence com::sun::star::beans::PropertyValue  
aFilterData( 1 );
 
 // Room for improvment:
@@ -144,7 +143,14 @@ const Graphic ImpLoadLinkedGraphic( const String 
aFileName, const String aFilter
 // there we should create a new service to provide this data if needed
 aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
CreateNativeLink ) );
 aFilterData[ 0 ].Value = Any( sal_True );
-pGF-ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, 
aFilterData );
+
+// #123042# for e.g SVG the path is needed, so hand it over here. I 
have no real idea
+// what consequences this may have; maybe this is not handed over by 
purpose here. Not
+// handing it over means that any GraphicFormat that internallv needs 
a path as base
+// to interpret included links may fail.
+// Alternatively the path may be set at the result after this call 
when it is known
+

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

2013-09-11 Thread Herbert Dürr
 sfx2/source/sidebar/TabBar.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1a078f3584e8a288c0ec33f176638406423ade63
Author: Herbert Dürr h...@apache.org
Date:   Wed Sep 11 09:02:57 2013 +

#i123198# catch and ignore uno exceptions in 
sfx2::sidebar::TabBar::Item::HandleClick()

Patch by: Herbert Duerr
Scenario found by: Thorsten Wagner

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 184e13f..5e1a2c5 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -309,7 +309,12 @@ Image TabBar::GetItemImage (const DeckDescriptor 
rDeckDescriptor) const
 
 IMPL_LINK(TabBar::Item, HandleClick, Button*, EMPTYARG)
 {
-maDeckActivationFunctor(msDeckId);
+try
+{
+maDeckActivationFunctor(msDeckId);
+}
+catch( const ::com::sun::star::uno::Exception) {} // workaround for 
#i123198#
+
 return 1;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-29 Thread Andre Fischer
 sfx2/source/sidebar/DeckLayouter.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 98bd1aded3ffa1df24bfec28624bdf5129533c45
Author: Andre Fischer a...@apache.org
Date:   Thu Aug 29 07:34:34 2013 +

123091: Request repaints of panels on every deck layouting.

diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index 7154b52..1bd129a 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -262,6 +262,7 @@ sal_Int32 DeckLayouter::PlacePanels (
 
 // Place the panel.
 rPanel.SetPosSizePixel(0, nY, nWidth, nPanelHeight);
+rPanel.Invalidate();
 
 nY += nPanelHeight;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-04 Thread Herbert Dürr
 sfx2/source/sidebar/ControllerItem.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 797e399967ffb1c28b8c32d328f5f57d79a8caf3
Author: Herbert Dürr h...@apache.org
Date:   Tue Jun 4 07:15:18 2013 +

#i122433# fix build breaker: invalid use of incomplete type 'struct Help'

diff --git a/sfx2/source/sidebar/ControllerItem.cxx 
b/sfx2/source/sidebar/ControllerItem.cxx
index 1455232..4aefc9b 100644
--- a/sfx2/source/sidebar/ControllerItem.cxx
+++ b/sfx2/source/sidebar/ControllerItem.cxx
@@ -31,6 +31,7 @@
 #include sfx2/sidebar/CommandInfoProvider.hxx
 #include vcl/svapp.hxx
 #include vcl/toolbox.hxx
+#include vcl/help.hxx
 
 #include com/sun/star/frame/XFrame.hpp
 #include com/sun/star/frame/XFrameActionListener.hpp
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-31 Thread Andre Fischer
 sfx2/source/sidebar/Accessible.cxx |   68 +++
 sfx2/source/sidebar/Accessible.hxx |   72 +
 sfx2/source/sidebar/AccessibleTitleBar.cxx |   72 +
 sfx2/source/sidebar/AccessibleTitleBar.hxx |   53 +
 4 files changed, 265 insertions(+)

New commits:
commit 488befaed6d5203d8a6e1c9e986caa5d342f5b40
Author: Andre Fischer a...@apache.org
Date:   Fri May 31 11:29:01 2013 +

122271: Added missing files.

diff --git a/sfx2/source/sidebar/Accessible.cxx 
b/sfx2/source/sidebar/Accessible.cxx
new file mode 100644
index 000..19fb8f6
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.cxx
@@ -0,0 +1,68 @@
+/**
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include precompiled_sfx2.hxx
+
+#include Accessible.hxx
+
+
+using namespace css;
+using namespace cssu;
+
+
+namespace sfx2 { namespace sidebar {
+
+
+Accessible::Accessible (
+const Referenceaccessibility::XAccessibleContext rxContext)
+: AccessibleInterfaceBase(m_aMutex),
+  mxContext(rxContext)
+{
+}
+
+
+
+
+Accessible::~Accessible (void)
+{
+}
+
+
+
+
+void SAL_CALL Accessible::disposing (void)
+{
+ReferenceXComponent xComponent (mxContext, UNO_QUERY);
+if (xComponent.is())
+xComponent-dispose();
+}
+
+
+
+
+Referenceaccessibility::XAccessibleContext SAL_CALL 
Accessible::getAccessibleContext (void)
+throw (cssu::RuntimeException)
+{
+return mxContext;
+}
+
+
+} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/Accessible.hxx 
b/sfx2/source/sidebar/Accessible.hxx
new file mode 100644
index 000..6209c27
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.hxx
@@ -0,0 +1,72 @@
+/**
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#ifndef SFX_SIDEBAR_ACCESSIBLE_HXX
+#define SFX_SIDEBAR_ACCESSIBLE_HXX
+
+#include com/sun/star/accessibility/XAccessible.hpp
+#include com/sun/star/accessibility/XAccessibleContext.hpp
+
+#include cppuhelper/compbase1.hxx
+#include cppuhelper/basemutex.hxx
+
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+namespace
+{
+typedef ::cppu::WeakComponentImplHelper1 
+css::accessibility::XAccessible
+ AccessibleInterfaceBase;
+}
+
+namespace sfx2 { namespace sidebar {
+
+
+/** Simple implementation of the XAccessible interface.
+Its getAccessibleContext() method returns a context object given
+to its constructor.
+*/
+class Accessible
+: private ::boost::noncopyable,
+  private ::cppu::BaseMutex,
+  public AccessibleInterfaceBase
+{
+public:
+Accessible (
+const cssu::Referencecss::accessibility::XAccessibleContext 
rxContext);
+virtual ~Accessible (void);
+
+virtual void SAL_CALL disposing (void);
+
+
+// XAccessible
+virtual cssu::Referencecss::accessibility::XAccessibleContext SAL_CALL 
getAccessibleContext (void)
+throw (cssu::RuntimeException);
+
+private:
+cssu::Referencecss::accessibility::XAccessibleContext mxContext;
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif
diff --git a/sfx2/source/sidebar/AccessibleTitleBar.cxx 
b/sfx2/source/sidebar/AccessibleTitleBar.cxx
new 

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

2013-05-29 Thread Andre Fischer
 sfx2/source/sidebar/SidebarController.cxx |   60 ++
 sfx2/source/sidebar/SidebarController.hxx |   16 ++--
 2 files changed, 42 insertions(+), 34 deletions(-)

New commits:
commit c726a12e1833af2f06858e5a797bcbd03bf9e996
Author: Andre Fischer a...@apache.org
Date:   Wed May 29 15:57:18 2013 +

122394: Force creation of new sidebar panels on DATACHANGED events.

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index e49ba24..067349a 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -114,6 +114,7 @@ SidebarController::SidebarController (
   mxFrame(rxFrame),
   maCurrentContext(OUString(), OUString()),
   maRequestedContext(),
+  mnRequestedForceFlags(SwitchFlag_NoForce),
   msCurrentDeckId(gsDefaultDeckId),
   msCurrentDeckTitle(),
   
maPropertyChangeForwarder(::boost::bind(SidebarController::BroadcastPropertyChange,
 this)),
@@ -268,7 +269,7 @@ void SAL_CALL SidebarController::statusChanged (const 
css::frame::FeatureStateEv
 // Force the current deck to update its panel list.
 if ( ! mbIsDocumentReadOnly)
 msCurrentDeckId = gsDefaultDeckId;
-maCurrentContext = Context();
+mnRequestedForceFlags |= SwitchFlag_ForceSwitch;
 maContextChangeUpdate.RequestCall();
 }
 }
@@ -389,7 +390,8 @@ void SidebarController::ProcessNewWidth (const sal_Int32 
nNewWidth)
 
 void SidebarController::UpdateConfigurations (void)
 {
-if (maCurrentContext != maRequestedContext)
+if (maCurrentContext != maRequestedContext
+|| mnRequestedForceFlags!=SwitchFlag_NoForce)
 {
 maCurrentContext = maRequestedContext;
 
@@ -469,7 +471,9 @@ void SidebarController::OpenThenSwitchToDeck (
 void SidebarController::SwitchToDeck (
 const ::rtl::OUString rsDeckId)
 {
-if ( ! msCurrentDeckId.equals(rsDeckId) || ! mbIsDeckOpen)
+if ( ! msCurrentDeckId.equals(rsDeckId)
+|| ! mbIsDeckOpen
+|| mnRequestedForceFlags!=SwitchFlag_NoForce)
 {
 const DeckDescriptor* pDeckDescriptor = 
ResourceManager::Instance().GetDeckDescriptor(rsDeckId);
 if (pDeckDescriptor != NULL)
@@ -486,7 +490,12 @@ void SidebarController::SwitchToDeck (
 {
 maFocusManager.Clear();
 
-if ( ! msCurrentDeckId.equals(rDeckDescriptor.msId))
+const bool bForceNewDeck 
((mnRequestedForceFlagsSwitchFlag_ForceNewDeck)!=0);
+const bool bForceNewPanels 
((mnRequestedForceFlagsSwitchFlag_ForceNewPanels)!=0);
+mnRequestedForceFlags = SwitchFlag_NoForce;
+
+if ( ! msCurrentDeckId.equals(rDeckDescriptor.msId)
+|| bForceNewDeck)
 {
 // When the deck changes then destroy the deck and all panels
 // and create everything new.
@@ -560,10 +569,20 @@ void SidebarController::SwitchToDeck (
 
 // Find the corresponding panel among the currently active
 // panels.
-SharedPanelContainer::const_iterator iPanel (::std::find_if(
+SharedPanelContainer::const_iterator iPanel;
+if (bForceNewPanels)
+{
+// All panels have to be created in any case.  There is no
+// point in searching already existing panels.
+iPanel = rCurrentPanels.end();
+}
+else
+{
+iPanel = ::std::find_if(
 rCurrentPanels.begin(),
 rCurrentPanels.end(),
-::boost::bind(Panel::HasIdPredicate, _1, 
::boost::cref(rPanelContexDescriptor.msId;
+::boost::bind(Panel::HasIdPredicate, _1, 
::boost::cref(rPanelContexDescriptor.msId)));
+}
 if (iPanel != rCurrentPanels.end())
 {
 // Panel already exists in current deck.  Reuse it.
@@ -572,7 +591,8 @@ void SidebarController::SwitchToDeck (
 }
 else
 {
-// Panel does not yet exist.  Create it.
+// Panel does not yet exist or creation of new panels is forced.
+// Create it.
 aNewPanels[nWriteIndex] = CreatePanel(
 rPanelContexDescriptor.msId,
 mpCurrentDeck-GetPanelParentWindow(),
@@ -623,30 +643,6 @@ void SidebarController::SwitchToDeck (
 
 
 
-bool SidebarController::ArePanelSetsEqual (
-const SharedPanelContainer rCurrentPanels,
-const ResourceManager::PanelContextDescriptorContainer rRequestedPanels)
-{
-if (rCurrentPanels.size() != rRequestedPanels.size())
-return false;
-for (sal_Int32 nIndex=0,nCount=rCurrentPanels.size(); nIndexnCount; 
++nIndex)
-{
-if (rCurrentPanels[nIndex] == NULL)
-return false;
-if ( ! 
rCurrentPanels[nIndex]-GetId().equals(rRequestedPanels[nIndex].msId))
-return false;
-
-// Check if the panels still can be displayed.  This may not be the 
case when
-// the document just become rea-only.
-if 

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

2013-05-13 Thread Andre Fischer
 sfx2/source/sidebar/SidebarController.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0763a83fb20825c66d8a3ecc50327753f7508bf9
Author: Andre Fischer a...@apache.org
Date:   Mon May 13 11:00:09 2013 +

122272: Select correct sidebar button after changing decks via menu.

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 6d6250d..3e5c05e 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -488,6 +488,7 @@ void SidebarController::SwitchToDeck (
 
 msCurrentDeckId = rDeckDescriptor.msId;
 }
+mpTabBar-HighlightDeck(msCurrentDeckId);
 
 // Determine the panels to display in the deck.
 ResourceManager::PanelContextDescriptorContainer aPanelContextDescriptors;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-30 Thread Ariel Constenla-Haile
 sfx2/source/doc/objstor.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 399f004135b506ac2c23307c46c7a0053d77fa17
Author: Ariel Constenla-Haile arie...@apache.org
Date:   Sat Mar 30 12:50:15 2013 +

i95421 - Set MediaType when storing thumbnail.png

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 776061a..6b1f76f 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3705,16 +3705,20 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( 
sal_Bool bEncrypted,
 
 try {
 uno::Reference embed::XStorage  xThumbnailStor =
-xStor-openStorageElement( 
::rtl::OUString::createFromAscii( Thumbnails ),
+xStor-openStorageElement( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(Thumbnails)),
 
embed::ElementModes::READWRITE );
 if ( xThumbnailStor.is() )
 {
 uno::Reference io::XStream  xStream = 
xThumbnailStor-openStreamElement(
-
::rtl::OUString::createFromAscii( thumbnail.png ),
+::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM(thumbnail.png)),
 
embed::ElementModes::READWRITE );
 
 if ( xStream.is()  WriteThumbnail( bEncrypted, bSigned, 
bIsTemplate, xStream ) )
 {
+uno::Reference beans::XPropertySet  xPropSet( xStream, 
uno::UNO_QUERY );
+if ( xPropSet.is() )
+xPropSet-setPropertyValue( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM(MediaType)),
+uno::makeAny( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM(image/png;
 uno::Reference embed::XTransactedObject  xTransact( 
xThumbnailStor, uno::UNO_QUERY_THROW );
 xTransact-commit();
 bResult = sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits