summaryrefslogtreecommitdiff
path: root/svtools/source/contnr
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r--svtools/source/contnr/fileview.cxx5
-rw-r--r--svtools/source/contnr/svimpbox.cxx4
-rw-r--r--svtools/source/contnr/svlbox.cxx6
-rw-r--r--svtools/source/contnr/svtabbx.cxx41
-rw-r--r--svtools/source/contnr/templwin.cxx17
-rw-r--r--svtools/source/contnr/templwin.src14
6 files changed, 59 insertions, 28 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index d56c270fd5a8..274557051c27 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1065,7 +1065,10 @@ BOOL ViewTabListBox_Impl::DoubleClickHdl()
::rtl::OUString sRet = SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos );
if ( ::svt::BBTYPE_TABLECELL == _eType )
{
- sal_Int32 nRow = _nPos / GetColumnCount();
+ sal_Int32 nRow = -1;
+ const sal_uInt16 nColumnCount = GetColumnCount();
+ if (nColumnCount > 0)
+ nRow = _nPos / nColumnCount;
SvLBoxEntry* pEntry = GetEntry( nRow );
if ( pEntry )
{
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 276557854f02..e17b81e548a9 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3213,7 +3213,9 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
if( pPopup )
{
// do action for selected entry in popup menu
- pView->ExcecuteContextMenuAction( pPopup->Execute( pView, aPopupPos ) );
+ USHORT nMenuAction = pPopup->Execute( pView, aPopupPos );
+ if ( nMenuAction )
+ pView->ExcecuteContextMenuAction( nMenuAction );
lcl_DeleteSubPopups(pPopup);
delete pPopup;
}
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 1c81343cd84f..e56db398b8fb 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -1203,6 +1203,12 @@ void SvLBox::ViewDataInitialized( SvLBoxEntry* )
DBG_CHKTHIS(SvLBox,0);
}
+void SvLBox::StateChanged( StateChangedType eType )
+{
+ if( eType == STATE_CHANGE_ENABLE )
+ Invalidate( INVALIDATE_CHILDREN );
+ Control::StateChanged( eType );
+}
void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
{
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 32e8e68facb1..fc02c85dfd25 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -980,10 +980,12 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR
if ( !AreChildrenTransient() )
{
+ const sal_uInt16 nColumnCount = GetColumnCount();
+
// first call? -> initial list
if ( m_aAccessibleChildren.empty() )
{
- sal_Int32 nCount = ( GetRowCount() + 1 ) * GetColumnCount();
+ sal_Int32 nCount = ( GetRowCount() + 1 ) * nColumnCount;
m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() );
}
@@ -1021,8 +1023,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_u
// first call? -> initial list
if ( m_aAccessibleChildren.empty() )
{
- sal_Int32 nCount = AreChildrenTransient() ? GetColumnCount()
- : ( GetRowCount() + 1 ) * GetColumnCount();
+ const sal_uInt16 nColumnCount = GetColumnCount();
+ sal_Int32 nCount = AreChildrenTransient() ?
+ nColumnCount : ( GetRowCount() + 1 ) * nColumnCount;
m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() );
}
@@ -1098,9 +1101,12 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
if ( _nPos >= 0 )
{
sal_uInt16 nColumnCount = GetColumnCount();
- sal_Int32 nRow = _nPos / nColumnCount;
- sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
- aRetText = GetCellText( nRow, nColumn );
+ if (nColumnCount > 0)
+ {
+ sal_Int32 nRow = _nPos / nColumnCount;
+ sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
+ aRetText = GetCellText( nRow, nColumn );
+ }
}
break;
}
@@ -1135,16 +1141,19 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
static const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) );
sal_uInt16 nColumnCount = GetColumnCount();
- sal_Int32 nRow = _nPos / nColumnCount;
- sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
-
- String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
- aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
- String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
- if ( sColHeader.Len() == 0 )
- sColHeader = String::CreateFromInt32( nColumn );
- aText.SearchAndReplace( sVar2, sColHeader );
- aRetText = aText;
+ if (nColumnCount > 0)
+ {
+ sal_Int32 nRow = _nPos / nColumnCount;
+ sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
+
+ String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
+ aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
+ String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
+ if ( sColHeader.Len() == 0 )
+ sColHeader = String::CreateFromInt32( nColumn );
+ aText.SearchAndReplace( sVar2, sColHeader );
+ aRetText = aText;
+ }
}
return aRetText;
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 042088d317bb..2b212fdcffeb 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -35,6 +35,7 @@
#include <svtools/svtdata.hxx>
#include <svtools/pathoptions.hxx>
#include <svtools/dynamicmenuoptions.hxx>
+#include <svtools/extendedsecurityoptions.hxx>
#include <svtools/xtextedt.hxx>
#include <svtools/inettype.hxx>
#include "imagemgr.hxx"
@@ -1742,9 +1743,16 @@ void SvtDocumentTemplateDialog::InitImpl( )
pImpl = new SvtTmplDlg_Impl( this );
pImpl->aTitle = GetText();
+ bool bHideLink = ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
+ == SvtExtendedSecurityOptions::OPEN_NEVER );
+ if ( !bHideLink )
+ {
aMoreTemplatesLink.SetURL( String(
RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508" ) ) );
aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) );
+ }
+ else
+ aMoreTemplatesLink.Hide();
aManageBtn.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OrganizerHdl_Impl ) );
Link aLink = LINK( this, SvtDocumentTemplateDialog, OKHdl_Impl );
@@ -1762,14 +1770,17 @@ void SvtDocumentTemplateDialog::InitImpl( )
Size aSize = GetOutputSizePixel();
Point aPos = aMoreTemplatesLink.GetPosPixel();
Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
- aPos.Y() -= a6Size.Height();
+ if ( bHideLink )
+ aPos.Y() += aMoreTemplatesLink.GetSizePixel().Height();
+ else
+ aPos.Y() -= a6Size.Height();
long nDelta = aPos.Y() - nHeight;
aSize.Height() -= nDelta;
SetOutputSizePixel( aSize );
aSize.Height() = nHeight;
- aSize.Width() -= a6Size.Width();
- pImpl->pWin->SetPosSizePixel( Point( a6Size.Width() / 2, 0 ), aSize );
+ aSize.Width() -= ( a6Size.Width() * 2 );
+ pImpl->pWin->SetPosSizePixel( Point( a6Size.Width(), 0 ), aSize );
aPos = aMoreTemplatesLink.GetPosPixel();
aPos.Y() -= nDelta;
diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src
index c8b9c4d58123..30149de4da14 100644
--- a/svtools/source/contnr/templwin.src
+++ b/svtools/source/contnr/templwin.src
@@ -275,7 +275,7 @@ ModalDialog DLG_DOCTEMPLATE
HelpId = HID_TEMPLATEDLG_DIALOG ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT( 320, 245 );
+ Size = MAP_APPFONT( 320, 250 );
Text [ en-US ] = "Templates and Documents" ;
Moveable = TRUE ;
FixedText FT_DOCTEMPLATE_LINK
@@ -288,35 +288,35 @@ ModalDialog DLG_DOCTEMPLATE
FixedLine FL_DOCTEMPLATE
{
Pos = MAP_APPFONT( 0, 219 );
- Size = MAP_APPFONT( 320, 1 );
+ Size = MAP_APPFONT( 320, 8 );
};
PushButton BTN_DOCTEMPLATE_MANAGE
{
- Pos = MAP_APPFONT( 3, 225 );
+ Pos = MAP_APPFONT( 6, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "Organi~ze...";
};
PushButton BTN_DOCTEMPLATE_EDIT
{
- Pos = MAP_APPFONT( 56, 225 );
+ Pos = MAP_APPFONT( 59, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Edit";
};
OKButton BTN_DOCTEMPLATE_OPEN
{
- Pos = MAP_APPFONT( 158, 225 );
+ Pos = MAP_APPFONT( 155, 230 );
Size = MAP_APPFONT( 50, 14 );
DefButton = TRUE;
Text [ en-US ] = "~Open";
};
CancelButton BTN_DOCTEMPLATE_CANCEL
{
- Pos = MAP_APPFONT( 211, 225 );
+ Pos = MAP_APPFONT( 208, 230 );
Size = MAP_APPFONT( 50, 14 );
};
HelpButton BTN_DOCTEMPLATE_HELP
{
- Pos = MAP_APPFONT( 267, 225 );
+ Pos = MAP_APPFONT( 264, 230 );
Size = MAP_APPFONT( 50, 14 );
};
};