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

2023-07-17 Thread Noel Grandin (via logerrit)
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |3 ++-
 sw/source/uibase/docvw/AnnotationWin2.cxx|2 +-
 vcl/source/outdev/transparent.cxx|2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0821457cdb6476b2b1860c8aeda718b130ab808e
Author: Noel Grandin 
AuthorDate: Mon Jul 17 13:03:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 17 16:27:35 2023 +0200

simply some LogicToPixel calculation sites

Change-Id: I9698562dd1f8d4679c342ded1022bde698be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154523
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx 
b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 077bdaead1db..09e01e939693 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1027,7 +1027,8 @@ void ScShapeChildren::FillShapes(const tools::Rectangle& 
aPixelPaintRect, const
 uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), 
uno::UNO_QUERY);
 if (xShape.is())
 {
-tools::Rectangle 
aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), 
pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode));
+tools::Rectangle aRect(pWin->LogicToPixel(
+tools::Rectangle(VCLPoint(xShape->getPosition()), 
VCLSize(xShape->getSize())), aMapMode));
 if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty())
 {
 ScShapeChild aShape;
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index ae52f1c21075..8c7a26bc1b10 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -147,7 +147,7 @@ void SwAnnotationWin::PaintTile(vcl::RenderContext& 
rRenderContext, const tools:
 
 bool SwAnnotationWin::IsHitWindow(const Point& rPointLogic)
 {
-tools::Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), 
EditWin().PixelToLogic(GetSizePixel()));
+tools::Rectangle 
aRectangleLogic(EditWin().PixelToLogic(tools::Rectangle(GetPosPixel(),GetSizePixel(;
 return aRectangleLogic.Contains(rPointLogic);
 }
 
diff --git a/vcl/source/outdev/transparent.cxx 
b/vcl/source/outdev/transparent.cxx
index 4a4b6b5a54bb..793b26e2e581 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -585,7 +585,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& 
rMtf, const Point& rPos,
 else
 {
 GDIMetaFile* pOldMetaFile = mpMetaFile;
-tools::Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) 
);
+tools::Rectangle aOutRect( LogicToPixel( tools::Rectangle(rPos, rSize) 
) );
 Point aPoint;
 tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() );
 


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

2023-01-30 Thread Miklos Vajna (via logerrit)
 sc/source/ui/vba/vbaborders.cxx |   10 +-
 sw/source/ui/vba/vbapanes.cxx   |   10 +-
 sw/source/ui/vba/vbastyles.cxx  |   22 +++---
 3 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 1f474cbb8acdf6855db1f835fe58d198bdbabcbc
Author: Miklos Vajna 
AuthorDate: Mon Jan 30 08:50:38 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 30 14:28:20 2023 +

sw: prefix members of PanesEnumWrapper, RangeBorderEnumWrapper, ...

... StyleCollectionHelper and StylesEnumWrapper

See tdf#94879 for motivation.

Change-Id: Ibbce6f1d068ace5374fdc14e50e079a01872773f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146336
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 7572935816e0..ae5716e871c0 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -367,18 +367,18 @@ namespace {
 class RangeBorderEnumWrapper : public EnumerationHelper_BASE
 {
 uno::Reference m_xIndexAccess;
-sal_Int32 nIndex;
+sal_Int32 m_nIndex;
 public:
-explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > 
xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {}
+explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > 
xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), m_nIndex( 0 ) {}
 virtual sal_Bool SAL_CALL hasMoreElements(  ) override
 {
-return ( nIndex < m_xIndexAccess->getCount() );
+return ( m_nIndex < m_xIndexAccess->getCount() );
 }
 
 virtual uno::Any SAL_CALL nextElement(  ) override
 {
-if ( nIndex < m_xIndexAccess->getCount() )
-return m_xIndexAccess->getByIndex( nIndex++ );
+if ( m_nIndex < m_xIndexAccess->getCount() )
+return m_xIndexAccess->getByIndex( m_nIndex++ );
 throw container::NoSuchElementException();
 }
 };
diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx
index a5e884da24b2..05b288e29074 100644
--- a/sw/source/ui/vba/vbapanes.cxx
+++ b/sw/source/ui/vba/vbapanes.cxx
@@ -61,18 +61,18 @@ public:
 class PanesEnumWrapper : public EnumerationHelper_BASE
 {
 uno::Reference m_xIndexAccess;
-sal_Int32 nIndex;
+sal_Int32 m_nIndex;
 public:
-explicit PanesEnumWrapper( uno::Reference< container::XIndexAccess > 
xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {}
+explicit PanesEnumWrapper( uno::Reference< container::XIndexAccess > 
xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), m_nIndex( 0 ) {}
 virtual sal_Bool SAL_CALL hasMoreElements(  ) override
 {
-return ( nIndex < m_xIndexAccess->getCount() );
+return ( m_nIndex < m_xIndexAccess->getCount() );
 }
 
 virtual uno::Any SAL_CALL nextElement(  ) override
 {
-if ( nIndex < m_xIndexAccess->getCount() )
-return m_xIndexAccess->getByIndex( nIndex++ );
+if ( m_nIndex < m_xIndexAccess->getCount() )
+return m_xIndexAccess->getByIndex( m_nIndex++ );
 throw container::NoSuchElementException();
 }
 };
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 12217e15324c..5e9ce270ff9e 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -174,7 +174,7 @@ class StyleCollectionHelper : public 
::cppu::WeakImplHelper< container::XNameAcc
 {
 private:
 uno::Reference< container::XNameAccess > mxParaStyles;
-uno::Any cachePos;
+uno::Any m_cachePos;
 public:
 explicit StyleCollectionHelper( const uno::Reference< frame::XModel >& 
_xModel )
 {
@@ -191,7 +191,7 @@ public:
 {
 if ( !hasByName(aName) )
 throw container::NoSuchElementException();
-return cachePos;
+return m_cachePos;
 }
 virtual uno::Sequence< OUString > SAL_CALL getElementNames(  ) override
 {
@@ -208,7 +208,7 @@ public:
 OUString sStyleName = OUString::createFromAscii( 
pTable->pOOoStyleName );
 if( mxParaStyles->hasByName( sStyleName ) )
 {
-cachePos = mxParaStyles->getByName( sStyleName );
+m_cachePos = mxParaStyles->getByName( sStyleName );
 return true;
 }
 return false;
@@ -217,7 +217,7 @@ public:
 
 if( mxParaStyles->hasByName( aName ) )
 {
-cachePos = mxParaStyles->getByName( aName );
+m_cachePos = mxParaStyles->getByName( aName );
 return true;
 }
 else
@@ -227,7 +227,7 @@ public:
 [&aName](const OUString& rStyleName) { return 
rStyleName.equalsIgnoreAsciiCase( aName ); });
 if (pStyleName != sElementNames.end())
 {
-cachePos = mxParaStyles->getByName( *pStyleName );
+m_ca

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

2022-10-08 Thread Mike Kaganski (via logerrit)
 sc/source/ui/docshell/impex.cxx  |   22 --
 sw/source/core/fields/ddefld.cxx |   10 +++---
 2 files changed, 23 insertions(+), 9 deletions(-)

New commits:
commit 94df17f58fe6269452b7252b712a89978c444bec
Author: Mike Kaganski 
AuthorDate: Sat Oct 8 22:10:44 2022 +0300
Commit: Mike Kaganski 
CommitDate: Sun Oct 9 00:16:51 2022 +0200

tdf#151429: don't convert OUStrings to system encoding

... just to convert back to OUString in the end.

Change-Id: I727d5e4c03d1a49f64bd5ca3d64157a9149cd9ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141125
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 2a7ed9da5d06..5ef0cca91c28 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -288,14 +288,24 @@ bool ScImportExport::ExportData( const OUString& 
rMimeType,
  css::uno::Any & rValue )
 {
 SvMemoryStream aStrm;
+SotClipboardFormatId fmtId = 
SotExchange::GetFormatIdFromMimeType(rMimeType);
+if (fmtId == SotClipboardFormatId::STRING)
+aStrm.SetStreamCharSet(RTL_TEXTENCODING_UNICODE);
 // mba: no BaseURL for data exchange
-if( ExportStream( aStrm, OUString(),
-SotExchange::GetFormatIdFromMimeType( rMimeType ) ))
+if (ExportStream(aStrm, OUString(), fmtId))
 {
-aStrm.WriteUChar( 0 );
-rValue <<= css::uno::Sequence< sal_Int8 >(
-static_cast(aStrm.GetData()),
-aStrm.TellEnd() );
+if (fmtId == SotClipboardFormatId::STRING)
+{
+assert(aStrm.TellEnd() % sizeof(sal_Unicode) == 0);
+rValue <<= OUString(static_cast(aStrm.GetData()),
+aStrm.TellEnd() / sizeof(sal_Unicode));
+}
+else
+{
+aStrm.WriteUChar(0);
+rValue <<= css::uno::Sequence(static_cast(aStrm.GetData()),
+aStrm.TellEnd());
+}
 return true;
 }
 return false;
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 19efa6a207ea..55b7d4566609 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -70,9 +70,13 @@ public:
 case SotClipboardFormatId::STRING:
 if( !IsNoDataFlag() )
 {
-uno::Sequence< sal_Int8 > aSeq;
-rValue >>= aSeq;
-OUString sStr( reinterpret_cast(aSeq.getConstArray()), aSeq.getLength(), osl_getThreadTextEncoding() );
+OUString sStr;
+if (!(rValue >>= sStr))
+{
+uno::Sequence< sal_Int8 > aSeq;
+rValue >>= aSeq;
+sStr = OUString(reinterpret_cast(aSeq.getConstArray()), aSeq.getLength(), osl_getThreadTextEncoding());
+}
 
 // remove not needed CR-LF at the end
 sal_Int32 n = sStr.getLength();


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

2022-07-27 Thread Andrea Gelmini (via logerrit)
 sc/source/ui/app/inputhdl.cxx  |2 +-
 sw/source/ui/misc/bookmark.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ecef3edbcd61a80c1c65982a1ac71b23e06d3d54
Author: Andrea Gelmini 
AuthorDate: Wed Jul 27 07:52:33 2022 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 27 08:59:46 2022 +0200

Fix typos

Change-Id: Ic0e61610612e987c9b1b75f9edcf9c04807d6737
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137488
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 99b8be0284a8..3e9fe8e917de 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4242,7 +4242,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* 
pState,
 EditView* pActiveView = pTopView ? pTopView : 
pTableView;
 ESelection aSel = pActiveView ? 
pActiveView->GetSelection() : ESelection();
 
-// if we switched content completly - don't send huge 
numbers
+// if we switched content completely - don't send huge 
numbers
 if (aSel.nStartPara == EE_PARA_NOT_FOUND)
 aSel.nStartPara = 0;
 
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index fe63d4c133ca..6f45170d5d0b 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -390,7 +390,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* 
pParent, SwWrtShell& rS)
 m_xEditTextBtn->set_sensitive(false);
 m_xRenameBtn->set_sensitive(false);
 
-// select 3rd colum, otherwise it'll pick 1st one FIXME doesn't work with 
gtk?
+// select 3rd column, otherwise it'll pick 1st one FIXME doesn't work with 
gtk?
 m_xBookmarksBox->set_column_editables({ false, false, true, false, false 
});
 
 PopulateTable();


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

2021-11-24 Thread Andrea Gelmini (via logerrit)
 sc/source/core/data/table3.cxx   |2 +-
 sw/source/core/doc/textboxhelper.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7614a8cf6e9d46b5bae13507c433f3d799a99711
Author: Andrea Gelmini 
AuthorDate: Wed Nov 24 12:13:08 2021 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 24 15:57:24 2021 +0100

Fix typos

Change-Id: Ibc2eb80d7cc0cfc22c7fea0dc7ebe495ae0927c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125765
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 42d74aece6b5..c8ba5c882234 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3032,7 +3032,7 @@ bool ScTable::ValidQuery(
 
 // Short-circuit the test at the end of the loop - if this is SC_AND
 // and the previous value is false, this value will not be needed.
-// Disbable this if pbTestEqualCondition is present as that one may 
get set
+// Disable this if pbTestEqualCondition is present as that one may get 
set
 // even if the result is false (that also means pTest doesn't need to 
be
 // handled here).
 if (rEntry.eConnect == SC_AND && pbTestEqualCondition == nullptr
diff --git a/sw/source/core/doc/textboxhelper.cxx 
b/sw/source/core/doc/textboxhelper.cxx
index 8bd107623b8a..3fc5c4a56313 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -1374,7 +1374,7 @@ bool SwTextBoxHelper::changeAnchor(SwFrameFormat* pShape, 
SdrObject* pObj)
 const uno::Any aShapeVertRelOrient
 = uno::makeAny(pShape->GetVertOrient().GetRelationOrient());
 
-// Get the new page number. If this is 0 incrase it to 1!
+// Get the new page number. If this is 0 increase it to 1!
 // (0 is invalid page)
 const sal_uInt16 nPageNum = rNewAnch.GetPageNum() ? 
rNewAnch.GetPageNum() : 1;
 


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

2021-07-21 Thread Mike Kaganski (via logerrit)
 sc/source/ui/drawfunc/drawsh2.cxx   |4 ++--
 sw/source/uibase/shells/drawdlg.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0d4cbdbc9cd4ab06056cec66cffd292b41615b6e
Author: Mike Kaganski 
AuthorDate: Thu Jul 22 00:56:07 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jul 22 00:38:17 2021 +0200

Dereferencing uninitialized pointer

SfxItemSet::GetItemState returns SfxItemState::DEFAULT without
resetting the passed pointer.

Regression after commit dd5bf12193471f064bf7f581dd1b21783390e735.

Change-Id: I1e427a05f8e5b375f50d81b51d32e78fca83eb42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119348
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/drawfunc/drawsh2.cxx 
b/sc/source/ui/drawfunc/drawsh2.cxx
index 82609b657959..889c7efd33b3 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -390,13 +390,13 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
 if( bHasMarked )
 {
 SfxAllItemSet aSet(pDrView->GetAttrFromMarked(false));
-if (const SfxPoolItem * pItem;
+if (const SfxPoolItem* pItem = nullptr;
 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false, &pItem) >= 
SfxItemState::DEFAULT
 && pItem)
 {
 aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
 }
-if (const SfxPoolItem * pItem;
+if (const SfxPoolItem* pItem = nullptr;
 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false, &pItem) >= 
SfxItemState::DEFAULT
 && pItem)
 {
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index b18ce9327b68..9922e9d79fa8 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -371,14 +371,14 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
 SfxItemSet aSet(rSet);
 aSet.MergeRange(SDRATTR_TEXTCOLUMNS_NUMBER, 
SDRATTR_TEXTCOLUMNS_SPACING);
 pSdrView->GetAttributes(aSet);
-if (const SfxPoolItem * pItem;
+if (const SfxPoolItem* pItem = nullptr;
 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false, &pItem)
 >= SfxItemState::DEFAULT
 && pItem)
 {
 aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
 }
-if (const SfxPoolItem * pItem;
+if (const SfxPoolItem* pItem = nullptr;
 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false, &pItem)
 >= SfxItemState::DEFAULT
 && pItem)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-28 Thread Noel Grandin (via logerrit)
 sc/source/core/data/stlpool.cxx |   61 +++-
 sw/source/ui/chrdlg/chardlg.cxx |8 ++---
 sw/source/ui/dbui/dbinsdlg.cxx  |   44 ++--
 sw/source/ui/frmdlg/frmpage.cxx |8 ++---
 sw/source/uibase/app/applab.cxx |3 +
 sw/source/uibase/app/docsh2.cxx |5 +--
 6 files changed, 63 insertions(+), 66 deletions(-)

New commits:
commit 9b81036c87b52edc2ce44813b31be425bc12ee1d
Author: Noel Grandin 
AuthorDate: Fri May 28 10:18:15 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri May 28 17:30:07 2021 +0200

no need to allocate these on the heap

Change-Id: I55ecf6b8d9df2078f9bc81f54dbabf425c300643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116320
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 8248218b14c3..51e7f6c09e1c 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -217,13 +217,12 @@ void ScStyleSheetPool::CreateStandardStyles()
 const OUString  aHelpFile;//which text???
 SfxItemSet* pSet= nullptr;
 SfxItemSet* pHFSet  = nullptr;
-SvxSetItem* pHFSetItem  = nullptr;
 std::unique_ptr pEdEngine(new 
ScEditEngineDefaulter( EditEngine::CreatePool().get(), true ));
 pEdEngine->SetUpdateMode( false );
 std::unique_ptr pEmptyTxtObj = 
pEdEngine->CreateTextObject();
 std::unique_ptr pTxtObj;
-std::unique_ptr pHeaderItem(new ScPageHFItem( 
ATTR_PAGE_HEADERRIGHT ));
-std::unique_ptr pFooterItem(new ScPageHFItem( 
ATTR_PAGE_FOOTERRIGHT ));
+ScPageHFItem aHeaderItem( ATTR_PAGE_HEADERRIGHT );
+ScPageHFItem aFooterItem( ATTR_PAGE_FOOTERRIGHT );
 ScStyleSheet*   pSheet  = nullptr;
 ::editeng::SvxBorderLineaBorderLine ( &aColBlack, DEF_LINE_WIDTH_2 
);
 SvxBoxItem  aBoxItem( ATTR_BORDER );
@@ -276,12 +275,11 @@ void ScStyleSheetPool::CreateStandardStyles()
 pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_STD );
 
 // distance to header/footer for the sheet
-pHFSetItem = new SvxSetItem( pSet->Get( ATTR_PAGE_HEADERSET ) );
-pHFSetItem->SetWhich(ATTR_PAGE_HEADERSET);
-pSet->Put( *pHFSetItem );
-pHFSetItem->SetWhich(ATTR_PAGE_FOOTERSET);
-pSet->Put( *pHFSetItem );
-delete pHFSetItem;
+SvxSetItem aHFSetItem = pSet->Get( ATTR_PAGE_HEADERSET );
+aHFSetItem.SetWhich(ATTR_PAGE_HEADERSET);
+pSet->Put( aHFSetItem );
+aHFSetItem.SetWhich(ATTR_PAGE_FOOTERSET);
+pSet->Put( aHFSetItem );
 
 // Header:
 // [empty][\sheet\][empty]
@@ -289,10 +287,10 @@ void ScStyleSheetPool::CreateStandardStyles()
 pEdEngine->SetTextCurrentDefaults(EMPTY_OUSTRING);
 pEdEngine->QuickInsertField( SvxFieldItem(SvxTableField(), 
EE_FEATURE_FIELD), ESelection() );
 pTxtObj = pEdEngine->CreateTextObject();
-pHeaderItem->SetLeftArea  ( *pEmptyTxtObj );
-pHeaderItem->SetCenterArea( *pTxtObj );
-pHeaderItem->SetRightArea ( *pEmptyTxtObj );
-pSet->Put( *pHeaderItem );
+aHeaderItem.SetLeftArea  ( *pEmptyTxtObj );
+aHeaderItem.SetCenterArea( *pTxtObj );
+aHeaderItem.SetRightArea ( *pEmptyTxtObj );
+pSet->Put( aHeaderItem );
 
 // Footer:
 // [empty][Page \STR_PAGE\][empty]
@@ -302,10 +300,10 @@ void ScStyleSheetPool::CreateStandardStyles()
 nStrLen = aStr.getLength();
 pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), 
EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) );
 pTxtObj = pEdEngine->CreateTextObject();
-pFooterItem->SetLeftArea  ( *pEmptyTxtObj );
-pFooterItem->SetCenterArea( *pTxtObj );
-pFooterItem->SetRightArea ( *pEmptyTxtObj );
-pSet->Put( *pFooterItem );
+aFooterItem.SetLeftArea  ( *pEmptyTxtObj );
+aFooterItem.SetCenterArea( *pTxtObj );
+aFooterItem.SetRightArea ( *pEmptyTxtObj );
+pSet->Put( aFooterItem );
 
 // 2. Report
 
@@ -329,17 +327,16 @@ void ScStyleSheetPool::CreateStandardStyles()
 aBoxInfoItem.SetTable( false );
 aBoxInfoItem.SetDist ( true );
 
-pHFSetItem = new SvxSetItem( pSet->Get( ATTR_PAGE_HEADERSET ) );
-pHFSet = &(pHFSetItem->GetItemSet());
+SvxSetItem aHFSetItem2 = pSet->Get( ATTR_PAGE_HEADERSET );
+pHFSet = &(aHFSetItem2.GetItemSet());
 
 pHFSet->Put( SvxBrushItem( COL_LIGHTGRAY, ATTR_BACKGROUND ) );
 pHFSet->Put( aBoxItem );
 pHFSet->Put( aBoxInfoItem );
-pHFSetItem->SetWhich(ATTR_PAGE_HEADERSET);
-pSet->Put( *pHFSetItem );
-pHFSetItem->SetWhich(ATTR_PAGE_FOOTERSET);
-pSet->Put( *pHFSetItem );
-delete pHFSetItem;
+aHFSetItem2.SetWhich(ATTR_PAGE_HEADERSET);
+pSet->Put( aHFSetItem2 );
+aHFSetItem2.SetWhich(ATTR_PAGE_FOOTERSET);
+pSet->Put( aHFSetItem2 );
 
 // Footer:
 // [\TABLE\ (\DATA\)][empty][\DATE\, \TIME\]
@@ -349,16 +346,16 @@ void ScStyleSheetPool::CreateStandardStyles()
 pEdEngine->QuickInsertField( SvxFieldItem(SvxFileField(), 

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

2021-05-20 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/dpgroupdlg.cxx   |   16 +---
 sc/source/ui/dbgui/pvfundlg.cxx |   25 +++--
 sc/source/ui/dbgui/scuiasciiopt.cxx |   30 +-
 sc/source/ui/inc/dpgroupdlg.hxx |2 +-
 sc/source/ui/inc/instbdlg.hxx   |2 +-
 sc/source/ui/inc/pvfundlg.hxx   |4 ++--
 sc/source/ui/inc/scuiasciiopt.hxx   |3 ++-
 sc/source/ui/inc/tpcalc.hxx |2 +-
 sc/source/ui/inc/tpformula.hxx  |1 +
 sc/source/ui/miscdlgs/instbdlg.cxx  |9 ++---
 sc/source/ui/optdlg/tpcalc.cxx  |   16 +---
 sc/source/ui/optdlg/tpformula.cxx   |   20 ++--
 sw/source/ui/config/optpage.cxx |   13 -
 sw/source/ui/fldui/javaedit.cxx |   21 ++---
 sw/source/uibase/inc/javaedit.hxx   |3 ++-
 sw/source/uibase/inc/optpage.hxx|2 +-
 16 files changed, 103 insertions(+), 66 deletions(-)

New commits:
commit 253f7af7bcd2337a06c027852286616ff91d2e3f
Author: Caolán McNamara 
AuthorDate: Thu May 20 12:56:31 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 20 17:02:12 2021 +0200

use toggle instead of click for RadioButton

Change-Id: Ia43c3ccae0dcbfb0c522a8c13db6fbfb72bfa4f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115877
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx 
b/sc/source/ui/dbgui/dpgroupdlg.cxx
index f86199f1acc2..d260b4337680 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -233,7 +233,7 @@ ScDPDateGroupDlg::ScDPDateGroupDlg(weld::Window* pParent,
 if( rInfo.mbDateValues )
 {
 mxRbNumDays->set_active(true);
-ClickHdl(*mxRbNumDays );
+ToggleHdl(*mxRbNumDays );
 
 double fNumDays = rInfo.mfStep;
 if( fNumDays < 1.0 )
@@ -245,7 +245,7 @@ ScDPDateGroupDlg::ScDPDateGroupDlg(weld::Window* pParent,
 else
 {
 mxRbUnits->set_active(true);
-ClickHdl(*mxRbUnits);
+ToggleHdl(*mxRbUnits);
 }
 
 /*  Set the initial focus, currently it is somewhere after calling all the 
radio
@@ -259,8 +259,8 @@ ScDPDateGroupDlg::ScDPDateGroupDlg(weld::Window* pParent,
 else if( mxLbUnits->get_sensitive() )
 mxLbUnits->grab_focus();
 
-mxRbNumDays->connect_clicked( LINK( this, ScDPDateGroupDlg, ClickHdl ) );
-mxRbUnits->connect_clicked( LINK( this, ScDPDateGroupDlg, ClickHdl ) );
+mxRbNumDays->connect_toggled( LINK( this, ScDPDateGroupDlg, ToggleHdl ) );
+mxRbUnits->connect_toggled( LINK( this, ScDPDateGroupDlg, ToggleHdl ) );
 mxLbUnits->connect_toggled( LINK( this, ScDPDateGroupDlg, CheckHdl ) );
 }
 
@@ -302,9 +302,11 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const
 return nDatePart;
 }
 
-IMPL_LINK(ScDPDateGroupDlg, ClickHdl, weld::Button&, rButton, void)
+IMPL_LINK(ScDPDateGroupDlg, ToggleHdl, weld::ToggleButton&, rButton, void)
 {
-if (&rButton == mxRbNumDays.get())
+if (!rButton.get_active())
+return;
+if (mxRbNumDays->get_active())
 {
 mxLbUnits->set_sensitive(false);
 // enable and set focus to edit field on clicking "num of days" radio 
button
@@ -312,7 +314,7 @@ IMPL_LINK(ScDPDateGroupDlg, ClickHdl, weld::Button&, 
rButton, void)
 mxEdNumDays->grab_focus();
 mxBtnOk->set_sensitive(true);
 }
-else if (&rButton == mxRbUnits.get())
+else if (mxRbUnits->get_active())
 {
 mxEdNumDays->set_sensitive(false);
 // enable and set focus to listbox on clicking "units" radio button
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 43f4e33274a1..6c1e006ecbc5 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -527,9 +527,9 @@ void ScDPSubtotalDlg::Init( const ScDPLabelData& 
rLabelData, const ScPivotFuncDa
 mxFtName->set_label(rLabelData.getDisplayName());
 
 // radio buttons
-mxRbNone->connect_clicked( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
-mxRbAuto->connect_clicked( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
-mxRbUser->connect_clicked( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
+mxRbNone->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
+mxRbAuto->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
+mxRbUser->connect_toggled( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
 
 weld::RadioButton* pRBtn = nullptr;
 switch( rFuncData.mnFuncMask )
@@ -562,9 +562,11 @@ IMPL_LINK(ScDPSubtotalDlg, ButtonClicked, weld::Button&, 
rButton, void)
 response(RET_CANCEL);
 }
 
-IMPL_LINK(ScDPSubtotalDlg, RadioClickHdl, weld::Button&, rBtn, void)
+IMPL_LINK(ScDPSubtotalDlg, RadioClickHdl, weld::ToggleButton&, rBtn, void)
 {
-mxLbFunc->set_sensitive(&rBtn == mxRbUser.get());
+if (!rBtn.get_active())
+return;
+mxLbFunc->set_sensitive(mxRbUser->get_active());
 }
 
 IMPL_LINK

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

2021-04-27 Thread Caolán McNamara (via logerrit)
 sc/source/ui/inc/content.hxx   |2 -
 sc/source/ui/navipi/content.cxx|   55 +
 sc/source/ui/navipi/navipi.cxx |5 ---
 sw/source/uibase/utlui/content.cxx |4 +-
 4 files changed, 4 insertions(+), 62 deletions(-)

New commits:
commit c0cbd13c945c5f47057b413efc88b2e3bb72d025
Author: Caolán McNamara 
AuthorDate: Mon Apr 26 09:36:14 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Apr 27 09:51:15 2021 +0200

Related: tdf#130326 drop ScContentTree::ObjectFresh

this was introduced as part of the large IA2 integration

commit b41332475783c31136673fb44cf4c411bb0148f8
Author: Steve Yin 
Date:   Mon Dec 2 15:54:29 2013 +

Integrate branch of IAccessible2

Both calc and writer gained the feature that "space" in the navigator
for drawing objects selects the highlighted object, extending the
selection if another one is already selected. (notably impress was
left unchanged)

In calc, but not writer, an ObjectFresh was added which fires
on every SfxHintId::ScKillEditView which is broadcast on every
exit of the cursor from a cell. Its purpose seems to be primarily to
re-highlight the last selected-by-keyboard entry on a content refresh.

As far as I can tell this doesn't seem necessary and we already refresh
content on SfxHintId::ScDrawChanged events so we shouldn't need to
additionally refresh on ScKillEditView and refreshing on every
ScKillEditView is very slow on navigating through a calc document with a
lot of drawing objects.

Change-Id: I64b2840f8510d474314d108e657fc3367f8ab6c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114650
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 9156a72f14dc..88a2b9ac3dc3 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -54,7 +54,6 @@ class ScContentTree
 ScDocument* pHiddenDocument;// temporary
 boolbIsInNavigatorDlg;
 boolm_bFreeze;
-OUStringsKeyString;
 ImplSVEvent*m_nAsyncMouseReleaseId;
 
 o3tl::enumarray pPosList; // for the sequence
@@ -123,7 +122,6 @@ public:
 ScContentTree(std::unique_ptr xTreeView, ScNavigatorDlg* 
pNavigatorDlg);
 ~ScContentTree();
 
-void ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry = 
nullptr);
 void SetNavigatorDlgFlag(bool isInNavigateDlg){ 
bIsInNavigatorDlg=isInNavigateDlg;};
 
 voidhide()
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 53b4e413de50..c870e156c163 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -455,7 +455,8 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 break;
 }
 }
-//Make KEY_SPACE has same function as DoubleClick
+//Make KEY_SPACE has same function as DoubleClick, and realize
+//multi-selection.
 if ( bIsInNavigatorDlg )
 {
 if(aCode.GetCode() == KEY_SPACE )
@@ -473,7 +474,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 if ( bHiddenDoc )
 return true;//! later...
 OUString aText(m_xTreeView->get_text(*xEntry));
-sKeyString = aText;
 if (!aManualDoc.isEmpty())
 pParentWindow->SetCurrentDoc( aManualDoc );
 switch (nType)
@@ -507,7 +507,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 }
 if (!bHasMakredObject && pScTabViewShell)
 pScTabViewShell->SetDrawShell(false);
-ObjectFresh(nType, xEntry.get());
 }
 break;
 }
@@ -667,56 +666,6 @@ ScDocument* ScContentTree::GetSourceDocument()
 return nullptr;
 }
 
-//Move along and draw "*" sign .
-void ScContentTree::ObjectFresh(ScContentId nType, const weld::TreeIter* 
pEntry)
-{
-if (bHiddenDoc && !pHiddenDocument)
-return; // other document displayed
-
-if (!(nType == ScContentId::GRAPHIC || nType == ScContentId::OLEOBJECT || 
nType == ScContentId::DRAWING))
-return;
-
-auto nOldChildren = m_aRootNodes[nType] ? 
m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0;
-auto nOldPos = m_xTreeView->vadjustment_get_value();
-
-freeze();
-ClearType( nType );
-GetDrawNames( nType/*, nId*/ );
-thaw();
-
-auto nNewChildren = m_aRootNodes[nType] ? 
m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0;
-bool bRestorePos = nOldChildren == nNewChildren;
-
-if (!pEntry)
-ApplyNavigatorSettings(bRestorePos, nOldPos);
-if (!pEntry)
- 

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

2020-12-26 Thread Gabor Kelemen (via logerrit)
 sc/source/core/tool/ddelink.cxx  |4 +---
 sw/source/core/fields/ddefld.cxx |4 +---
 sw/source/uibase/dochdl/swdtflvr.cxx |6 ++
 3 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 56169b613e5830d90323c1cad31d2015a1d4cb4d
Author: Gabor Kelemen 
AuthorDate: Sat Dec 5 16:01:30 2020 +0100
Commit: Noel Grandin 
CommitDate: Sat Dec 26 19:22:22 2020 +0100

Remove pointless macro

DDE_TXT_ENCODING is just an alias since 2008
commit a190965485508c4493ee33228dae68e12cd858f9 and
commit cc141699cc6b2fa38b0b0003bff27751e23ae8e4

Change-Id: I2ca32871c13bd3837f173e5f9f959f364857de52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108330
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index e97d629a9462..2678a4823beb 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -37,8 +37,6 @@
 #include 
 
 
-#define DDE_TXT_ENCODINGosl_getThreadTextEncoding()
-
 bool ScDdeLink::bIsInUpdate = false;
 
 ScDdeLink::ScDdeLink( ScDocument& rD, const OUString& rA, const OUString& rT, 
const OUString& rI,
@@ -130,7 +128,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
 return SUCCESS;
 
 OUString aLinkStr;
-ScByteSequenceToString::GetString( aLinkStr, rValue, DDE_TXT_ENCODING );
+ScByteSequenceToString::GetString( aLinkStr, rValue, 
osl_getThreadTextEncoding() );
 aLinkStr = convertLineEnd(aLinkStr, LINEEND_LF);
 
 //  if string ends with line end, discard:
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 817545ad2a04..9e07a8afa9bf 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -38,8 +38,6 @@
 
 using namespace ::com::sun::star;
 
-#define DDE_TXT_ENCODINGosl_getThreadTextEncoding()
-
 namespace {
 
 class SwIntrnlRefLink : public SwBaseLink
@@ -72,7 +70,7 @@ public:
 {
 uno::Sequence< sal_Int8 > aSeq;
 rValue >>= aSeq;
-OUString sStr( reinterpret_cast(aSeq.getConstArray()), aSeq.getLength(), DDE_TXT_ENCODING );
+OUString sStr( reinterpret_cast(aSeq.getConstArray()), aSeq.getLength(), osl_getThreadTextEncoding() );
 
 // remove not needed CR-LF at the end
 sal_Int32 n = sStr.getLength();
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index e5312d2be203..60ca05566069 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -160,8 +160,6 @@ void collectUIInformation(const OUString& rAction, const 
OUString& aParameters)
 
 }
 
-#define DDE_TXT_ENCODINGosl_getThreadTextEncoding()
-
 namespace {
 
 class SwTransferDdeLink : public ::sfx2::SvBaseLink
@@ -2564,7 +2562,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& 
rData,
 return false;
 }   // report useful error!!
 
-rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
+rtl_TextEncoding eEncoding = osl_getThreadTextEncoding();
 aApp = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding);
 aTopic = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding);
 aItem = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding);
@@ -4300,7 +4298,7 @@ bool SwTransferDdeLink::WriteData( SvStream& rStrm )
 if( !refObj.is() || !FindDocShell() )
 return false;
 
-rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
+rtl_TextEncoding eEncoding = osl_getThreadTextEncoding();
 const OString aAppNm(OUStringToOString(
 Application::GetAppName(), eEncoding));
 const OString aTopic(OUStringToOString(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-13 Thread Noel (via logerrit)
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx |8 +--
 sc/source/ui/undo/areasave.cxx  |   12 +---
 sc/source/ui/undo/undoblk.cxx   |   63 
 sc/source/ui/undo/undoblk2.cxx  |4 -
 sc/source/ui/undo/undoblk3.cxx  |   42 
 sc/source/ui/undo/undocell.cxx  |   20 +++
 sw/source/core/layout/objectformatter.cxx   |   29 +--
 sw/source/core/layout/pagechg.cxx   |   37 +-
 sw/source/core/layout/paintfrm.cxx  |   27 --
 sw/source/core/layout/sectfrm.cxx   |   16 +++---
 sw/source/core/layout/ssfrm.cxx |   12 ++--
 sw/source/core/layout/tabfrm.cxx|6 --
 sw/source/core/layout/trvlfrm.cxx   |8 +--
 sw/source/core/layout/wsfrm.cxx |   23 +++-
 sw/source/core/sw3io/swacorr.cxx|6 +-
 sw/source/core/text/itrcrsr.cxx |4 -
 sw/source/core/text/porfly.cxx  |6 +-
 sw/source/core/text/porrst.cxx  |3 -
 sw/source/core/text/txtfrm.cxx  |3 -
 sw/source/core/undo/rolbck.cxx  |   10 +--
 20 files changed, 157 insertions(+), 182 deletions(-)

New commits:
commit c93cdd4e2416c81ccc4b90fd96421d7e45cecd70
Author: Noel 
AuthorDate: Tue Oct 13 09:45:36 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 13 10:34:24 2020 +0200

static_cast after dynamic_cast

Change-Id: If1194bd3364fef8b2d0c26c22854745d0fb7b412
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104223
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 6a6bee924459..90e72f5bf1f8 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -245,11 +245,9 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
 case SID_H_ALIGNCELL:
 {
 SvxCellHorJustify meHorAlignState = SvxCellHorJustify::Standard;
-if(eState >= SfxItemState::DEFAULT && dynamic_cast( pState) )
-{
-const SvxHorJustifyItem* pItem = static_cast(pState);
-meHorAlignState = pItem->GetValue();
-}
+if(eState >= SfxItemState::DEFAULT)
+if (auto pItem = dynamic_cast( 
pState) )
+meHorAlignState = pItem->GetValue();
 
 if( meHorAlignState == SvxCellHorJustify::Repeat )
 {
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index e250aac70e60..3d50fba4f826 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -92,9 +92,9 @@ bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* 
pDoc ) const
 for (sal_uInt16 i=0; i( pBase) !=  nullptr)
+if (auto pAreaLink = dynamic_cast( pBase))
 {
-if ( nPos >= size() || !(*this)[nPos].IsEqual( 
*static_cast(pBase) ) )
+if ( nPos >= size() || !(*this)[nPos].IsEqual( *pAreaLink ) )
 return false;
 
 ++nPos;
@@ -113,11 +113,9 @@ static ScAreaLink* lcl_FindLink( const 
::sfx2::SvBaseLinks& rLinks, const ScArea
 for (sal_uInt16 i=0; i( pBase) !=  nullptr &&
- rSaver.IsEqualSource( *static_cast(pBase) ) )
-{
-return static_cast(pBase); // found
-}
+if ( auto pAreaLink = dynamic_cast( pBase) )
+if ( rSaver.IsEqualSource( *pAreaLink ) )
+return pAreaLink; // found
 }
 return nullptr;// not found
 }
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 36c016c0a8b5..be9e606b4915 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -107,20 +107,20 @@ bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction 
)
 if ( pPasteUndo )
 return pPasteUndo->Merge( pNextAction );
 
-if ( bPartOfPaste && dynamic_cast( pNextAction) !=  
nullptr )
-{
-ScUndoWrapper* pWrapper = static_cast(pNextAction);
-SfxUndoAction* pWrappedAction = pWrapper->GetWrappedUndo();
-if ( dynamic_cast( pWrappedAction) )
+if ( bPartOfPaste )
+if ( auto pWrapper = dynamic_cast( pNextAction) )
 {
-//  Store paste action if this is part of paste with inserting 
cells.
-//  A list action isn't used because Repeat wouldn't work (insert 
wrong cells).
+SfxUndoAction* pWrappedAction = pWrapper->GetWrappedUndo();
+if ( dynamic_cast( pWrappedAction) )
+{
+//  Store paste action if this is part of paste with inserting 
cells.
+//  A list action isn't used because Repeat wouldn't work 
(insert wrong cells).
 
-pPasteUndo.rese

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

2020-10-06 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/sortkeydlg.cxx |8 +++-
 sc/source/ui/inc/sortkeydlg.hxx   |2 ++
 sw/source/ui/index/cnttab.cxx |   14 --
 3 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit 19f331ca6aa87a438b1eeabef72978ddbfb0e747
Author: Caolán McNamara 
AuthorDate: Tue Oct 6 10:40:38 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Oct 6 14:42:48 2020 +0200

reparent to nothing to break gtk ownership cycle

which is our usual solution, instead of using less common flag

Change-Id: I9dd54a161df53a5b6ffb0b7655e510a6cc4c4824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx 
b/sc/source/ui/dbgui/sortkeydlg.cxx
index db218cf8678f..ec81bda34fc1 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -13,13 +13,19 @@
 
 ScSortKeyItem::ScSortKeyItem(weld::Container* pParent)
 : m_xBuilder(Application::CreateBuilder(pParent, 
"modules/scalc/ui/sortkey.ui"))
-, m_xFrame(m_xBuilder->weld_frame("SortKeyFrame", true))
+, m_xFrame(m_xBuilder->weld_frame("SortKeyFrame"))
 , m_xLbSort(m_xBuilder->weld_combo_box("sortlb"))
 , m_xBtnUp(m_xBuilder->weld_radio_button("up"))
 , m_xBtnDown(m_xBuilder->weld_radio_button("down"))
+, m_pParent(pParent)
 {
 }
 
+ScSortKeyItem::~ScSortKeyItem()
+{
+m_pParent->move(m_xFrame.get(), nullptr);
+}
+
 void ScSortKeyItem::DisableField()
 {
 m_xFrame->set_sensitive(false);
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 1ac699970d4c..85b6da332e20 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -23,8 +23,10 @@ struct ScSortKeyItem
 std::unique_ptr m_xLbSort;
 std::unique_ptr m_xBtnUp;
 std::unique_ptr m_xBtnDown;
+weld::Container* m_pParent;
 
 ScSortKeyItem(weld::Container* pParent);
+~ScSortKeyItem();
 
 void DisableField();
 void EnableField();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 8fa6ae0e21d6..0d7454f2410a 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1393,7 +1393,7 @@ public:
 , aFormToken(rToken)
 , bNextControl(false)
 , m_pParent(pTokenWin)
-, m_xEntry(m_xBuilder->weld_entry("entry", true))
+, m_xEntry(m_xBuilder->weld_entry("entry"))
 {
 m_xEntry->connect_changed(LINK(this, SwTOXEdit, ModifyHdl));
 m_xEntry->connect_key_press(LINK(this, SwTOXEdit, KeyInputHdl));
@@ -1401,6 +1401,11 @@ public:
 m_xEntry->set_tooltip_text(m_pParent->CreateQuickHelp(rToken));
 }
 
+virtual ~SwTOXEdit() override
+{
+m_pParent->get_child_container()->move(m_xEntry.get(), nullptr);
+}
+
 virtual WindowType GetType() const override
 {
 return WindowType::EDIT;
@@ -1549,13 +1554,18 @@ public:
 , aFormToken(rToken)
 , bNextControl(false)
 , m_pParent(pTokenWin)
-, m_xButton(m_xBuilder->weld_toggle_button("button", true))
+, m_xButton(m_xBuilder->weld_toggle_button("button"))
 {
 m_xButton->connect_key_press(LINK(this, SwTOXButton, KeyInputHdl));
 m_xButton->connect_focus_in(LINK(this, SwTOXButton, FocusInHdl));
 m_xButton->set_tooltip_text(m_pParent->CreateQuickHelp(rToken));
 }
 
+virtual ~SwTOXButton() override
+{
+m_pParent->get_child_container()->move(m_xButton.get(), nullptr);
+}
+
 virtual WindowType GetType() const override
 {
 return WindowType::PUSHBUTTON;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-15 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/gridwin.cxx   |4 
 sw/source/core/crsr/DropDownFormFieldButton.cxx |   13 +
 2 files changed, 17 insertions(+)

New commits:
commit 1067bf8a78a03b67f769761753b5a7226f611f9f
Author: Caolán McNamara 
AuthorDate: Mon Jun 15 14:55:28 2020 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 15 18:06:35 2020 +0200

consume tab key press in single-widget dropdown

Change-Id: Ie23fa35d29c20910514f3aaad095521f1588702b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96367
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1f49e48a68c4..1d3d189e92e3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -278,6 +278,10 @@ IMPL_LINK(ScFilterListBox, KeyInputHdl, const KeyEvent&, 
rKeyEvent, bool)
 bDone = true;
 }
 
+// nowhere to tab to
+if (aCode.GetCode() == KEY_TAB)
+bDone = true;
+
 return bDone;
 }
 
diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx 
b/sw/source/core/crsr/DropDownFormFieldButton.cxx
index 10664a027bba..9d7453dae5ff 100644
--- a/sw/source/core/crsr/DropDownFormFieldButton.cxx
+++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +54,7 @@ private:
 sw::mark::IFieldmark* m_pFieldmark;
 
 DECL_LINK(MyListBoxHandler, weld::TreeView&, bool);
+DECL_STATIC_LINK(SwFieldDialog, KeyInputHdl, const KeyEvent&, bool);
 
 public:
 SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, long 
nMinListWidth);
@@ -109,6 +111,7 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, 
sw::mark::IFieldmark* fieldBM, l
 lbSize.setWidth(std::max(lbSize.Width(), nMinListWidth));
 m_xListBox->SetSizePixel(lbSize);
 rTreeView.connect_row_activated(LINK(this, SwFieldDialog, 
MyListBoxHandler));
+rTreeView.connect_key_press(LINK(this, SwFieldDialog, KeyInputHdl));
 m_xListBox->Show();
 
 rTreeView.grab_focus();
@@ -147,6 +150,16 @@ IMPL_LINK(SwFieldDialog, MyListBoxHandler, 
weld::TreeView&, rBox, bool)
 return true;
 }
 
+IMPL_STATIC_LINK(SwFieldDialog, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
+{
+bool bDone = false;
+vcl::KeyCode aCode = rKeyEvent.GetKeyCode();
+// nowhere to tab to
+if (aCode.GetCode() == KEY_TAB)
+bDone = true;
+return bDone;
+}
+
 DropDownFormFieldButton::DropDownFormFieldButton(SwEditWin* pEditWin,
  sw::mark::DropDownFieldmark& 
rFieldmark)
 : FormFieldButton(pEditWin, rFieldmark)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-04 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   10 +++---
 sw/source/uibase/docvw/edtwin.cxx |6 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 9323307d675b71c501534ee98872a2f00b465bc2
Author: Mert Tumer 
AuthorDate: Wed Feb 26 18:48:46 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Mar 4 21:19:58 2020 +0100

fix ToC links give unhelpful url popups

core expects ctrl+click for internal links too and
it should not expect it if it is tiled rendering

Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 3fe9dfca2d44d9e41ee329883f199359c673f382)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89919
Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5ca54bae2a93..d690b59fccc6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2202,14 +2202,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 if ( GetEditUrl( rMEvt.GetPosPixel(), &aName, &aUrl, &aTarget ) )
 {
 nMouseStatus = SC_GM_NONE;  // Ignore double-click
-
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
 {
+if (aUrl.startsWith("#")) {
+ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+return;
+}
 // in mobile view there is no ctrl+click and for hyperlink 
popup
 // the cell coordinates must be sent along with click position 
for elegance
-if (comphelper::LibreOfficeKit::isActive() &&
+if (isTiledRendering &&
  
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
 {
 ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2260,7 +2264,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
 aBuf.append('#');
 OUString 
aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, 
formula::FormulaGrammar::CONV_OOO));
 aBuf.append(aUrlCalcA1);
-ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, 
isTiledRendering);
 }
 }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index a1e1a6f26db2..d60b347c6bb0 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4650,6 +4650,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
 }
 else if ( IsAttrAtPos::InetAttr == 
aContentAtPos.eContentAtPos )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString val((*static_cast(aContentAtPos.aFnd.pAttr)).GetValue());
+if (val.startsWith("#"))
+bExecHyperlinks = true;
+}
 if ( bExecHyperlinks && 
aContentAtPos.aFnd.pAttr )
 rSh.ClickToINetAttr( *static_cast(aContentAtPos.aFnd.pAttr), nFilter );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-14 Thread Jim Raykowski (via logerrit)
 sc/source/ui/styleui/styledlg.cxx |4 ++--
 sw/source/ui/fmtui/tmpdlg.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 582f8d35471a121ac92e5552ef77d9f430941ae7
Author: Jim Raykowski 
AuthorDate: Fri Dec 13 23:12:51 2019 -0900
Commit: Jim Raykowski 
CommitDate: Sun Dec 15 08:12:36 2019 +0100

Use SvxBkgTabPage::GetRanges for new background tab pages

Commit 03facb4bb75e4283c91de6f081ee96137ca4346c introduced GetRanges
function for SvxBkgTabPage. This patch replaces all uses of
SvxBackgroundTabPage::GetRanges for new background tab pages with
SvxBkgTabPage::GetRanges.

Change-Id: I5dd16617d25b09bcf2e02656abd84db25f7b614e
Reviewed-on: https://gerrit.libreoffice.org/85137
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sc/source/ui/styleui/styledlg.cxx 
b/sc/source/ui/styleui/styledlg.cxx
index ca6c1b727169..dd965a9aee8e 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -54,7 +54,7 @@ ScStyleDlg::ScStyleDlg(weld::Window* pParent,
 {
 AddTabPage("page", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 
pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ) );
 AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
-AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ) );
 AddTabPage("header", &ScHeaderPage::Create,  
&ScHeaderPage::GetRanges );
 AddTabPage("footer", &ScFooterPage::Create,  
&ScFooterPage::GetRanges );
 AddTabPage("sheet", &ScTablePage::Create, &ScTablePage::GetRanges 
);
@@ -73,7 +73,7 @@ ScStyleDlg::ScStyleDlg(weld::Window* pParent,
 else
 RemoveTabPage("asiantypo");
 AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
-AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ));
 AddTabPage("protection", &ScTabPageProtection::Create,
&ScTabPageProtection::GetRanges);
 }
 }
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 65d7f278ff12..917328b2bc0d 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -94,7 +94,7 @@ 
SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
 AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( 
RID_SVXPAGE_CHAR_EFFECTS ));
 AddTabPage("position", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( 
RID_SVXPAGE_CHAR_POSITION ));
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( 
RID_SVXPAGE_CHAR_TWOLINES ));
-AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ));
 AddTabPage("borders", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
 SvtCJKOptions aCJKOptions;
 if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
@@ -120,7 +120,7 @@ 
SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
 
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( 
RID_SVXPAGE_CHAR_TWOLINES ) );
 
-AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ));
 
 AddTabPage("tabs", 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),
pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-10-23 Thread Caolán McNamara (via logerrit)
 sc/source/ui/Accessibility/AccessibleDocument.cxx |1 +
 sw/source/core/access/accdoc.cxx  |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 00af5c36e16c233fe365b3da770cf420cd415c24
Author: Caolán McNamara 
AuthorDate: Wed Oct 23 14:17:56 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 23 18:10:51 2019 +0200

realloc sequence to amount of inserted elements

Change-Id: I5c507287631dd5cc87a037d0af67de77aca556d1
Reviewed-on: https://gerrit.libreoffice.org/81385
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index dbce56b37c59..ee68adf3fdb0 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2270,6 +2270,7 @@ css::uno::Sequence< css::uno::Any > 
ScAccessibleDocument::GetScAccFlowToSequence
 }
 }
 }
+aSequence.realloc(nParaCount);
 return aSequence;
 }
 }
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 9d498a4b3132..c1d542a4bd24 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -830,7 +830,7 @@ css::uno::Sequence< css::uno::Any >
 }
 nIndex++;
 }
-
+aRet.realloc(nIndex);
 return aRet;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-10-02 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/gridwin5.cxx |2 +-
 sw/source/core/draw/dpage.cxx  |   13 ++---
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 5761a23608e3ed9744711666e7465d11a450dc58
Author: Caolán McNamara 
AuthorDate: Wed Oct 2 14:16:50 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 2 17:14:36 2019 +0200

Resolves: tdf#127924 give hyperlink tooltip an area

instead of just a point

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

diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 198543e5ffcb..b940ffe200b1 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -326,7 +326,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
 if ( !aHelpText.isEmpty() )
 {
 tools::Rectangle 
aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()),
-
OutputToScreenPixel(aPixRect.BottomRight()));
+ 
OutputToScreenPixel(aPixRect.BottomRight()));
 
 if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
 Help::ShowBalloon(this,rHEvt.GetMousePosPixel(), aScreenRect, 
aHelpText);
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 36d887aa6cbf..b5f1698eebfe 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -166,9 +166,13 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView 
const * pView,
 SdrObject* pObj = pView->PickObj(aPos, 0, pPV, 
SdrSearchOptions::PICKMACRO);
 SwVirtFlyDrawObj* pDrawObj = dynamic_cast(pObj);
 OUString sText;
+tools::Rectangle aPixRect;
 if (pDrawObj)
 {
 SwFlyFrame *pFly = pDrawObj->GetFlyFrame();
+
+aPixRect = pWindow->LogicToPixel(pFly->getFrameArea().SVRect());
+
 const SwFormatURL &rURL = pFly->GetFormat()->GetURL();
 if( rURL.GetMap() )
 {
@@ -211,6 +215,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView 
const * pView,
 if (aVEvt.eEvent == SdrEventKind::ExecuteUrl)
 {
 sText = aVEvt.pURLField->GetURL();
+aPixRect = pWindow->LogicToPixel(aVEvt.pObj->GetLogicRect());
 }
 }
 
@@ -222,11 +227,13 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView 
const * pView,
 sText = SfxHelp::GetURLHelpText(sText);
 
 // then display the help:
-tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
+tools::Rectangle 
aScreenRect(pWindow->OutputToScreenPixel(aPixRect.TopLeft()),
+ 
pWindow->OutputToScreenPixel(aPixRect.BottomRight()));
+
 if (rEvt.GetMode() & HelpEventMode::BALLOON)
-Help::ShowBalloon(pWindow, rEvt.GetMousePosPixel(), aRect, 
sText);
+Help::ShowBalloon(pWindow, rEvt.GetMousePosPixel(), 
aScreenRect, sText);
 else
-Help::ShowQuickHelp(pWindow, aRect, sText);
+Help::ShowQuickHelp(pWindow, aScreenRect, sText);
 bContinue = false;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-09-23 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/validate.cxx  |4 +++-
 sw/source/ui/dbui/mmaddressblockpage.cxx |8 
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit ac1dff224e597ccbd235e41fcd918ea79727ccd2
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 16:38:15 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 23 20:27:57 2019 +0200

replace LogicToPixel uses in SfxTabPages

Change-Id: I4022c8ac71f2bdfc77c8920568b8242431391623
Reviewed-on: https://gerrit.libreoffice.org/79418
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index a4bacae396df..d9f1b00a4a48 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -354,7 +354,9 @@ ScTPValidationValue::ScTPValidationValue(TabPageParent 
pParent, const SfxItemSet
 , m_pBtnRefParent(m_xRefGrid.get())
 {
 m_xEdMin->SetReferences(nullptr, m_xFtMin.get());
-Size aSize(LogicToPixel(Size(174, 105), MapMode(MapUnit::MapAppFont)));
+
+Size aSize(m_xEdList->get_approximate_digit_width() * 40,
+   m_xEdList->get_height_rows(25));
 m_xEdList->set_size_request(aSize.Width(), aSize.Height());
 m_xEdMax->SetReferences(nullptr, m_xFtMax.get());
 
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx 
b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 18ddc67d2c4e..8c50dd1f454a 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -74,10 +74,10 @@ 
SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz
 , m_xSettingsWIN(new weld::CustomWeld(*m_xBuilder, "settingspreview", 
*m_xSettings))
 , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addresspreview", 
*m_xPreview))
 {
-Size aSize(LogicToPixel(Size(164 , 45), MapMode(MapUnit::MapAppFont)));
-m_xSettingsWIN->set_size_request(aSize.Width(), aSize.Height());
-aSize = LogicToPixel(Size(176, 46), MapMode(MapUnit::MapAppFont));
-m_xPreviewWIN->set_size_request(aSize.Width(), aSize.Height());
+
m_xSettingsWIN->set_size_request(m_xDifferentlist->get_approximate_digit_width()
 * 40,
+ m_xDifferentlist->get_text_height() * 6);
+
m_xPreviewWIN->set_size_request(m_xDifferentlist->get_approximate_digit_width() 
* 44,
+m_xDifferentlist->get_text_height() * 6);
 m_sChangeAddress = m_xDifferentlist->get_label();
 m_sDocument = m_xDocumentIndexFI->get_label();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-27 Thread Muhammet Kara (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx|   26 +---
 sw/source/uibase/shells/drawdlg.cxx |   58 +---
 2 files changed, 50 insertions(+), 34 deletions(-)

New commits:
commit d306d22d570817adb3986fc7054ae1e36768b8be
Author: Muhammet Kara 
AuthorDate: Thu Jun 27 21:12:42 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Jun 27 23:38:26 2019 +0200

lokdialog: Convert the Format -> Line... to async exec

for sw and sc

Change-Id: If89bff982d16ba8d4e4524445e56ee2fe23d7876
Reviewed-on: https://gerrit.libreoffice.org/74818
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 1f31a09cf439..2b3414368a96 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -373,6 +373,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
 const SdrObject*pObj= nullptr;
 const SdrMarkList&  rMarkList   = pView->GetMarkedObjectList();
 
+std::shared_ptr pRequest;
+pRequest.reset(new SfxRequest(rReq));
+
 if( rMarkList.GetMarkCount() == 1 )
 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
@@ -381,22 +384,25 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
 pView->MergeAttrFromMarked( aNewAttr, false );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr pDlg(pFact->CreateSvxLineTabDialog( 
pViewData->GetDialogParent(),
+VclPtr pDlg(pFact->CreateSvxLineTabDialog( 
pViewData->GetDialogParent(),
 &aNewAttr,
 pViewData->GetDocument()->GetDrawLayer(),
 pObj,
 bHasMarked));
 
-if ( pDlg->Execute() == RET_OK )
-{
-if( bHasMarked )
-pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
-else
-pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if ( nResult == RET_OK )
+{
+if( bHasMarked )
+pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
+else
+pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
 
-pView->InvalidateAttribs();
-rReq.Done();
-}
+pView->InvalidateAttribs();
+pRequest->Done();
+}
+pDlg->disposeOnce();
+});
 }
 
 void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index c2232bfa413b..b7e6fbd5ee11 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -144,36 +144,46 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxLineTabDialog(rReq.GetFrameWeld(),
+VclPtr 
pDlg(pFact->CreateSvxLineTabDialog(rReq.GetFrameWeld(),
 &aNewAttr,
 pDoc,
 pObj,
 bHasMarked));
-if (pDlg->Execute() == RET_OK)
-{
-pSh->StartAction();
-if(bHasMarked)
-pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), false);
-else
-pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), false);
-pSh->EndAction();
 
-static sal_uInt16 aInval[] =
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if (nResult == RET_OK)
 {
-SID_ATTR_LINE_STYLE,// ( SID_SVX_START + 
169 )
-SID_ATTR_LINE_DASH, // ( SID_SVX_START + 
170 )
-SID_ATTR_LINE_WIDTH,// ( SID_SVX_START + 
171 )
-SID_ATTR_LINE_COLOR,// ( SID_SVX_START + 
172 )
-SID_ATTR_LINE_START,// ( SID_SVX_START + 
173 )
-SID_ATTR_LINE_END,  // ( SID_SVX_START + 
174 )
-SID_ATTR_LINE_TRANSPARENCE, // (SID_SVX_START+1107)
-SID_ATTR_LINE_JOINT,// (SID_SVX_START+1110)
-SID_ATTR_LINE_CAP,  // (SID_SVX_START+)
-0
-};
-
-GetView().GetViewFrame()->GetBindings().Invalidate(aInval);
-}
+pSh->StartAction();
+if(bHasMarked)
+pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), 
false);
+else
+pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), 
false);
+pSh->EndAction();
+
+static sal_uInt16 aInval[] =
+{
+ 

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

2019-06-27 Thread Muhammet Kara (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx|   26 ++--
 sw/source/uibase/shells/drawdlg.cxx |   56 +---
 sw/source/uibase/shells/frmsh.cxx   |   52 +
 3 files changed, 76 insertions(+), 58 deletions(-)

New commits:
commit b82fdec369449e87df24acc8fa0daa54f2aeb4da
Author: Muhammet Kara 
AuthorDate: Thu Jun 27 18:06:06 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Jun 27 23:38:01 2019 +0200

lokdialog: Convert the Format -> ... -> Area... to async exec.

For sw and sc

Change-Id: I83ad76658545d8df135e1a08abff4d0b5a81b46a
Reviewed-on: https://gerrit.libreoffice.org/74808
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 66b776f2f9e0..1f31a09cf439 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -404,26 +404,32 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
 ScDrawView* pView   = pViewData->GetScDrawView();
 boolbHasMarked  = pView->AreObjectsMarked();
 
+std::shared_ptr pRequest;
+pRequest.reset(new SfxRequest(rReq));
+
 SfxItemSet  aNewAttr( pView->GetDefaultAttr() );
 if( bHasMarked )
 pView->MergeAttrFromMarked( aNewAttr, false );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 weld::Window* pWin = pViewData->GetDialogParent();
-ScopedVclPtr pDlg(pFact->CreateSvxAreaTabDialog(
+VclPtr pDlg(pFact->CreateSvxAreaTabDialog(
 pWin, &aNewAttr,
 pViewData->GetDocument()->GetDrawLayer(), true));
 
-if ( pDlg->Execute() == RET_OK )
-{
-if( bHasMarked )
-pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
-else
-pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if ( nResult == RET_OK )
+{
+if( bHasMarked )
+pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
+else
+pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
 
-pView->InvalidateAttribs();
-rReq.Done();
-}
+pView->InvalidateAttribs();
+pRequest->Done();
+}
+pDlg->disposeOnce();
+});
 }
 
 void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index ca2035850536..c2232bfa413b 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -93,34 +93,44 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 bool bHasMarked = pView->AreObjectsMarked();
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
+VclPtr 
pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
 
&aNewAttr,
 
pDoc,
 
true));
-if (pDlg->Execute() == RET_OK)
-{
-pSh->StartAction();
-if (bHasMarked)
-pView->SetAttributes(*pDlg->GetOutputItemSet());
-else
-pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), false);
-pSh->EndAction();
 
-static sal_uInt16 aInval[] =
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if (nResult == RET_OK)
 {
-SID_ATTR_FILL_STYLE,
-SID_ATTR_FILL_COLOR,
-SID_ATTR_FILL_TRANSPARENCE,
-SID_ATTR_FILL_FLOATTRANSPARENCE,
-0
-};
-SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
-rBnd.Invalidate(aInval);
-rBnd.Update(SID_ATTR_FILL_STYLE);
-rBnd.Update(SID_ATTR_FILL_COLOR);
-rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
-rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
-}
+pSh->StartAction();
+if (bHasMarked)
+pView->SetAttributes(*pDlg->GetOutputItemSet());
+else
+pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), 
false);
+pSh->EndAction();
+
+static sal_uInt16 aInval[] =
+{
+SID_ATTR_FILL_STYLE,
+SID_ATTR_FILL_COLOR,
+SID_ATTR_FILL_TRANSPARENCE,
+SID_ATTR_FILL_FLOATTRANSPARENCE,
+0
+  

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

2019-04-27 Thread Andrea Gelmini (via logerrit)
 sc/source/ui/miscdlgs/acredlin.cxx |2 +-
 sw/source/uibase/misc/redlndlg.cxx |2 +-
 vcl/source/app/svmain.cxx  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 734b33b73dbd4bd65265bce2a17ee07cdb3a5042
Author: Andrea Gelmini 
AuthorDate: Sat Apr 27 14:25:15 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Apr 27 21:46:31 2019 +0200

Fix typos

Change-Id: Id81e8db5a38b4e4a88cc21c50234c2338e9c41bf
Reviewed-on: https://gerrit.libreoffice.org/71421
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 54b029509c7b..5d4866fe8a18 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1704,7 +1704,7 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo* pInfo)
 aWidths.push_back(aEndPos[i] - aEndPos[i - 1]);
 
 // turn column end points back to column widths, ignoring the small
-// value used for the the expander column
+// value used for the expander column
 weld::TreeView& rTreeView = pTheView->GetWidget();
 rTreeView.set_column_fixed_widths(aWidths);
 }
diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index fa6ea10926a1..1861bc292057 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1174,7 +1174,7 @@ void SwRedlineAcceptDlg::Initialize(OUString& 
rExtraString)
 aWidths.push_back(aEndPos[i] - aEndPos[i - 1]);
 
 // turn column end points back to column widths, ignoring the 
small
-// value used for the the expander column
+// value used for the expander column
 weld::TreeView& rTreeView = m_pTable->GetWidget();
 rTreeView.set_column_fixed_widths(aWidths);
 }
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index e395e1a8634d..9372e74afc17 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -473,7 +473,7 @@ void DeInitVCL()
 
 pSVData->mpSettingsConfigItem.reset();
 
-// prevent unnessesary painting during Scheduler shutdown
+// prevent unnecessary painting during Scheduler shutdown
 // as this processes all pending events in debug builds.
 ImplGetSystemDependentDataManager().flushAll();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-04-26 Thread Andrea Gelmini (via logerrit)
 sc/source/core/tool/autoform.cxx |2 +-
 sw/source/core/doc/tblafmt.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1369a16651aba967c157f41793657369c094df5a
Author: Andrea Gelmini 
AuthorDate: Fri Apr 26 16:24:05 2019 +
Commit: Julien Nabet 
CommitDate: Fri Apr 26 23:08:15 2019 +0200

Fix typos

Change-Id: I693355a38f5bea33346d988015851d3a9cf8d1d4
Reviewed-on: https://gerrit.libreoffice.org/71387
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 00e0a7430b02..496b8870f1ab 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -146,7 +146,7 @@ ScAutoFormatDataField::ScAutoFormatDataField()
 aNumFormat()
 {
 // need to set default instances for base class AutoFormatBase here
-// due to ressource defines (e.g. ATTR_FONT) which are not available
+// due to resource defines (e.g. ATTR_FONT) which are not available
 // in svx and different in the different usages of derivations
 m_aFont = std::make_shared(ATTR_FONT);
 m_aHeight = std::make_shared(240, 100, 
ATTR_FONT_HEIGHT);
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 102ac460111d..430b32422382 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -214,7 +214,7 @@ SwBoxAutoFormat::SwBoxAutoFormat()
 m_wXObject()
 {
 // need to set default instances for base class AutoFormatBase here
-// due to ressource defines (e.g. RES_CHRATR_FONT) which are not available
+// due to resource defines (e.g. RES_CHRATR_FONT) which are not available
 // in svx and different in the different usages of derivations
 m_aFont = std::make_shared(*GetDfltAttr( RES_CHRATR_FONT ) );
 m_aHeight = std::make_shared(240, 100, 
RES_CHRATR_FONTSIZE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-11-19 Thread Libreoffice Gerrit user
 sc/source/core/data/attarray.cxx |1 -
 sc/source/core/data/dpoutput.cxx |1 -
 sc/source/filter/oox/sheetdatabuffer.cxx |1 -
 sw/source/filter/writer/wrtswtbl.cxx |1 -
 sw/source/filter/xml/xmlexpit.cxx|1 -
 sw/source/filter/xml/xmlimpit.cxx|1 -
 sw/source/uibase/utlui/uiitems.cxx   |1 -
 7 files changed, 7 deletions(-)

New commits:
commit 7f31a2a7fa5a0ec1d6e36161b95a26bbb96d5cd2
Author: Andrea Gelmini 
AuthorDate: Mon Nov 19 10:50:04 2018 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 19 14:54:41 2018 +0100

Removed duplicated includes

Change-Id: Idd6a5e84d93016f97745e6d9b99e4f79f7614ea7
Reviewed-on: https://gerrit.libreoffice.org/63554
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 3648de8fc976..ae181b7381fc 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index f0a15fd904bc..dd8d5a1e1e36 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx 
b/sc/source/filter/oox/sheetdatabuffer.cxx
index ba323332b24d..115b71b57fbc 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/filter/writer/wrtswtbl.cxx 
b/sw/source/filter/writer/wrtswtbl.cxx
index 55aaa3349d02..698f4df38c19 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmlexpit.cxx 
b/sw/source/filter/xml/xmlexpit.cxx
index b04d8f085e13..70172d3c6bf3 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -54,7 +54,6 @@
 #include "xmlithlp.hxx"
 
 #include 
-#include 
 
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmlimpit.cxx 
b/sw/source/filter/xml/xmlimpit.cxx
index 184a6e6194f1..5136416a06ae 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -52,7 +52,6 @@
 #include 
 #include "xmlithlp.hxx"
 #include 
-#include 
 
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
diff --git a/sw/source/uibase/utlui/uiitems.cxx 
b/sw/source/uibase/utlui/uiitems.cxx
index aa4746fdb26c..dd96cea07bcc 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -30,7 +30,6 @@
 #include 
 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-07 Thread Libreoffice Gerrit user
 sc/source/core/data/drwlayer.cxx|1 +
 sw/source/core/doc/DocumentDrawModelManager.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit fbc2b2d93a091c9dba26139878dd3d0acc5f31e9
Author: Regina Henschel 
AuthorDate: Fri Oct 5 21:24:45 2018 +0200
Commit: Regina Henschel 
CommitDate: Sun Oct 7 15:11:36 2018 +0200

tdf#120317 Set control layer name if not default

In commit a9ec212c1b545d745285f0ab3119a80713b1d1f2 the internal
default name of the layer, which holds form controls, was changed to
controls, the same name as used in file format and UNO. Users of
the class SdrLayerAdmin have to set the control layer name
explicitly in case they want an own, different name.

Change-Id: Ia08a85a4d01a75ee2c5115da25b2a409204ccc01
Reviewed-on: https://gerrit.libreoffice.org/61447
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 7fd0e6bd6201..1e97aa0600f8 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -296,6 +296,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const 
OUString& rName ) :
 rAdmin.NewLayer("hinten",   sal_uInt8(SC_LAYER_BACK));
 rAdmin.NewLayer("intern",   sal_uInt8(SC_LAYER_INTERN));
 rAdmin.NewLayer("Controls", sal_uInt8(SC_LAYER_CONTROLS));
+rAdmin.SetControlLayerName("Controls");
 rAdmin.NewLayer("hidden",   sal_uInt8(SC_LAYER_HIDDEN));
 // "Controls" is new - must also be created when loading
 
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx 
b/sw/source/core/doc/DocumentDrawModelManager.cxx
index e6da069859fd..1f5f4bfa8f5a 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -93,6 +93,7 @@ void DocumentDrawModelManager::InitDrawModel()
 
 sLayerNm = "Controls";
 mnControls = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
+mpDrawModel->GetLayerAdmin().SetControlLayerName(sLayerNm);
 
 // add invisible layers corresponding to the visible ones.
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-23 Thread Libreoffice Gerrit user
 sc/source/ui/drawfunc/fuconrec.cxx |4 +++-
 sw/source/core/frmedt/feshview.cxx |   14 ++
 2 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit b576d593cd702560f84ac28d8a17905e5e7b8353
Author: Maxim Monastirsky 
AuthorDate: Thu Aug 23 10:06:46 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Fri Aug 24 01:47:41 2018 +0200

Explicitly set line ends for measure lines

So they won't be lost on file export

Change-Id: I7da183e4b392fd9f3019b1f3029db15a56eff84d
Reviewed-on: https://gerrit.libreoffice.org/59483
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sc/source/ui/drawfunc/fuconrec.cxx 
b/sc/source/ui/drawfunc/fuconrec.cxx
index e07367d4af88..7d141be71fca 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -222,7 +222,8 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const 
SdrObject& rObj, sal
  nSlotId == SID_LINE_ARROW_CIRCLE ||
  nSlotId == SID_LINE_CIRCLE_ARROW ||
  nSlotId == SID_LINE_ARROW_SQUARE ||
- nSlotId == SID_LINE_SQUARE_ARROW )
+ nSlotId == SID_LINE_SQUARE_ARROW ||
+ nSlotId == SID_DRAW_MEASURELINE )
 {
 
 // set attributes of line start and ends
@@ -276,6 +277,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const 
SdrObject& rObj, sal
 switch (nSlotId)
 {
 case SID_LINE_ARROWS:
+case SID_DRAW_MEASURELINE:
 {
 // connector with arrow ends
 rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow));
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 37a526d855e2..30543a47b605 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -904,7 +904,8 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject 
const & rObj, sal_uInt1
   nSlotId == SID_LINE_ARROW_CIRCLE ||
   nSlotId == SID_LINE_CIRCLE_ARROW ||
   nSlotId == SID_LINE_ARROW_SQUARE ||
-  nSlotId == SID_LINE_SQUARE_ARROW) )
+  nSlotId == SID_LINE_SQUARE_ARROW ||
+  nSlotId == SID_DRAW_MEASURELINE) )
 return;
 
 // set attributes of line start and ends
@@ -958,6 +959,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject 
const & rObj, sal_uInt1
 switch (nSlotId)
 {
 case SID_LINE_ARROWS:
+case SID_DRAW_MEASURELINE:
 {
 // connector with arrow ends
 rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow));
@@ -3086,9 +3088,13 @@ long SwFEShell::GetSectionWidth( SwFormat const & 
rFormat ) const
 }
 else if(dynamic_cast( pObj) !=  nullptr)
 {
-sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
-static_cast(pObj)->SetPoint(Point(aStart.X(), 
nYMiddle), 0);
-static_cast(pObj)->SetPoint(Point(aEnd.X(), 
nYMiddle), 1);
+sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
+static_cast(pObj)->SetPoint(Point(aStart.X(), 
nYMiddle), 0);
+static_cast(pObj)->SetPoint(Point(aEnd.X(), 
nYMiddle), 1);
+
+SfxItemSet aAttr(pObj->getSdrModelFromSdrObject().GetItemPool());
+SetLineEnds(aAttr, *pObj, nSlotId);
+pObj->SetMergedItemSet(aAttr);
 }
 else if(dynamic_cast( pObj) !=  nullptr)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-29 Thread Libreoffice Gerrit user
 sc/source/ui/docshell/docfunc.cxx |8 
 sw/source/filter/html/swhtml.cxx  |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 465084267d99fb7f38296609dbb7c46460fe2144
Author: Jochen Nitschke 
AuthorDate: Sun Jul 29 13:51:47 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Sun Jul 29 16:25:13 2018 +0200

cppcheck: knownConditionTrueFalse

Change-Id: I531667ef580bfa81126cdb3a8d227c9e8783e02c
Reviewed-on: https://gerrit.libreoffice.org/58279
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 3570f4730ed2..d364a03fead4 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -709,7 +709,7 @@ bool ScDocFunc::TransliterateText( const ScMarkData& rMark, 
TransliterationFlags
 
 ScDocument& rDoc = rDocShell.GetDocument();
 bool bRecord = true;
-if (bRecord && !rDoc.IsUndoEnabled())
+if (!rDoc.IsUndoEnabled())
 bRecord = false;
 
 ScEditableTester aTester( &rDoc, rMark );
@@ -1310,7 +1310,7 @@ bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, 
const ScPatternAttr& r
 {
 ScDocument& rDoc = rDocShell.GetDocument();
 bool bRecord = true;
-if ( bRecord && !rDoc.IsUndoEnabled() )
+if ( !rDoc.IsUndoEnabled() )
 bRecord = false;
 
 bool bImportingXML = rDoc.IsImportingXML();
@@ -1379,7 +1379,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, 
const OUString& rStyleName,
 {
 ScDocument& rDoc = rDocShell.GetDocument();
 bool bRecord = true;
-if ( bRecord && !rDoc.IsUndoEnabled() )
+if ( !rDoc.IsUndoEnabled() )
 bRecord = false;
 
 bool bImportingXML = rDoc.IsImportingXML();
@@ -2187,7 +2187,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 PaintPartFlags nPaintFlags = PaintPartFlags::Grid;
 
 bool bRecord = true;
-if (bRecord && !rDoc.IsUndoEnabled())
+if (!rDoc.IsUndoEnabled())
 bRecord = false;
 
 ScMarkData aMark;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index f8543d6f601c..e48b55471639 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2231,7 +2231,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode 
eMode, bool bUpdateNum )
lcl_swhtml_getItemInfo( *pAttr, bScript, bFont,
 nScriptItem );
 // set previous part
-if( bInsert && bScript )
+if( bScript )
 {
 const SwTextNode *pTextNd =
 pAttr->GetSttPara().GetNode().GetTextNode();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-25 Thread Libreoffice Gerrit user
 sc/source/ui/view/tabvwshb.cxx   |3 ++-
 sw/source/uibase/uiview/viewstat.cxx |8 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 2a00e1f98d4cca448c1394e2504cc7539cb9ac1d
Author: Katarina Behrens 
AuthorDate: Tue Jul 24 19:03:23 2018 +0200
Commit: Katarina Behrens 
CommitDate: Wed Jul 25 17:35:32 2018 +0200

tdf#118777: Disable signature line slot if non-text object

both in sw and sc

Change-Id: I54f7ec336026013d09ac6262779e7fcbd17c2084
Reviewed-on: https://gerrit.libreoffice.org/57949
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 5fc41502f1ea..9fa70ff0ed0f 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -500,6 +500,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
 bool bTabProt = 
GetViewData().GetDocument()->IsTabProtected(GetViewData().GetTabNo());
 ScDocShell* pDocShell = GetViewData().GetDocShell();
 bool bShared = pDocShell && pDocShell->IsDocShared();
+SdrView* pSdrView = GetSdrView();
 
 SfxWhichIter aIter(rSet);
 sal_uInt16 nWhich = aIter.FirstWhich();
@@ -530,7 +531,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
 break;
 
 case SID_INSERT_SIGNATURELINE:
-if ( bTabProt || bShared )
+if ( bTabProt || bShared || (pSdrView && 
pSdrView->GetMarkedObjectCount() != 0))
 rSet.DisableItem( nWhich );
 break;
 case SID_EDIT_SIGNATURELINE:
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index 73661dca0b1b..04e344d0b10e 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -97,12 +97,18 @@ void SwView::GetState(SfxItemSet &rSet)
 break;
 
 case SID_INSERT_GRAPHIC:
-case SID_INSERT_SIGNATURELINE:
 if( m_pWrtShell->CursorInsideInputField() )
 {
 rSet.DisableItem(nWhich);
 }
 break;
+case SID_INSERT_SIGNATURELINE:
+if( !( m_nSelectionType & SelectionType::Text ||
+m_nSelectionType & SelectionType::NumberList ) )
+{
+rSet.DisableItem(nWhich);
+}
+break;
 case SID_EDIT_SIGNATURELINE:
 case SID_SIGN_SIGNATURELINE:
 if (!isSignatureLineSelected())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-24 Thread Libreoffice Gerrit user
 sc/source/ui/view/tabvwshb.cxx   |4 ++--
 sw/source/uibase/uiview/viewdlg2.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6de194cb685dbe105a73812afa73070d04341bfb
Author: Michael Stahl 
AuthorDate: Tue Jul 24 13:05:26 2018 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 24 15:06:07 2018 +0200

sw,sc: Signature Line: fix VclPtr assertion

Insert a Signature Line, right click, Sign..., Cancel

include/vcl/vclptr.hxx:116: VclPtr::~VclPtr() [with reference_type = 
AbstractSignSignatureLineDialog]: Assertion `(!m_rInnerRef.get() || 
m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot 
to call dispose()"' failed.

Change-Id: I09a1b37b917b267a84ee95fb375658974ee1b320
Reviewed-on: https://gerrit.libreoffice.org/57913
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 4e5fb7b98869..5fc41502f1ea 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -362,8 +362,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 GetViewData().GetDocShell()->GetBaseModel());
 
 VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-VclPtr pDialog
-= pFact->CreateSignSignatureLineDialog(GetFrameWeld(), 
xModel);
+ScopedVclPtr pDialog(
+pFact->CreateSignSignatureLineDialog(GetFrameWeld(), 
xModel));
 pDialog->Execute();
 break;
 }
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx 
b/sw/source/uibase/uiview/viewdlg2.cxx
index e88a14128519..6308b552a1ae 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -71,8 +71,8 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
 {
 VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
 const uno::Reference xModel(GetCurrentDocument());
-VclPtr pDialog
-= pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel);
+ScopedVclPtr pDialog(
+pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel));
 pDialog->Execute();
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-16 Thread Libreoffice Gerrit user
 sc/source/ui/inc/docsh.hxx |3 ++-
 sw/source/core/text/itratr.hxx |4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8203e556a9863d0a5562269f667e323bd39fcb9a
Author: Caolán McNamara 
AuthorDate: Sun Jul 15 21:19:19 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 16 14:10:48 2018 +0200

coverity#1401328 Uncaught exception

Change-Id: I08c91c9c84d53f567332e5780b14173b8c8e5fb1
Reviewed-on: https://gerrit.libreoffice.org/57462
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 3e4bf487127f..fe8dac8a1ef5 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SC_SOURCE_UI_INC_DOCSH_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -113,7 +114,7 @@ class SC_DLLPUBLIC ScDocShell final: public SfxObjectShell, 
public SfxListener
 std::unique_ptrm_pSheetSaveData;
 std::unique_ptr   m_pFormatSaveData;
 
-std::unique_ptr m_pModificator; // #109979#; is 
used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
+std::unique_ptr> m_pModificator; // #109979#; is 
used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
 
 css::uno::Reference< ooo::vba::excel::XWorkbook> 
mxAutomationWorkbookObject;
 
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 568a5ed53f26..d6e0d7f24a56 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -18,8 +18,8 @@
  */
 #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_ITRATR_HXX
 #define INCLUDED_SW_SOURCE_CORE_TEXT_ITRATR_HXX
+#include 
 #include "atrhndl.hxx"
-
 #include 
 #include 
 #include "porlay.hxx"
@@ -49,7 +49,7 @@ private:
 VclPtr m_pLastOut;
 /// count currently open hints, redlines, ext-input
 short m_nChgCnt;
-std::unique_ptr m_pRedline;
+std::unique_ptr> 
m_pRedline;
 /// current iteration index in HintStarts
 size_t m_nStartIndex;
 /// current iteration index in HintEnds
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-19 Thread Julien Nabet
 sc/source/ui/view/output2.cxx |2 +-
 sw/source/core/inc/rootfrm.hxx|2 +-
 sw/source/core/view/pagepreviewlayout.cxx |2 +-
 sw/source/ui/envelp/envprt.cxx|2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d5e30952beeb87b62048a9e3a34800e9a948b5a8
Author: Julien Nabet 
Date:   Sun Nov 19 20:57:04 2017 +0100

Typos about "bottom"

Change-Id: I8fec1f12d5f8330cd54da3e219268bf4e0b4c213
Reviewed-on: https://gerrit.libreoffice.org/44932
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index eb990ce561b7..a257c8f1a576 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -5203,7 +5203,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
 }
 }
 
-// TOPBOTTON and BOTTOMTOP are handled in 
DrawStrings/DrawEdit
+// TOPBOTTOM and BOTTOMTOP are handled in 
DrawStrings/DrawEdit
 OSL_ENSURE( eOrient == 
SvxCellOrientation::Standard && nAttrRotate,
 "DrawRotated: no rotation" );
 
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 1767a0814e0e..8dfc3452dd94 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -308,7 +308,7 @@ public:
  * Point rPt: The point that should be used to find the page
  * Size pSize: If given, we return the (first) page that overlaps with the
  * rectangle defined by rPt and pSize
- * bool bExtend: Extend each page to the left/right/top/botton up to the
+ * bool bExtend: Extend each page to the left/right/top/bottom up to the
  * next page margin
  */
 const SwPageFrame* GetPageAtPos( const Point& rPt, const Size* pSize = 
nullptr, bool bExtend = false ) const;
diff --git a/sw/source/core/view/pagepreviewlayout.cxx 
b/sw/source/core/view/pagepreviewlayout.cxx
index e7de84de66b9..3a13cc7f8ae4 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -431,7 +431,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 
_nProposedStartPageNum,
 }
 
 // shift visible preview document area to the top,
-// if on the botton is an area left blank.
+// if on the bottom is an area left blank.
 if ( mbBookPreviewModeToggled &&
  maPaintedPreviewDocRect.Bottom() == maPreviewDocRect.Bottom() &&
  maPaintedPreviewDocRect.GetHeight() < maWinSize.Height() )
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index b1a5819fd662..397e675f9f0f 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -88,7 +88,7 @@ IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl, Button*, void)
 {
 if (m_pBottomButton->IsChecked())
 {
-// Envelope from botton
+// Envelope from bottom
 m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], 
Image(BitmapEx(BMP_HOR_LEFT_LOWER)));
 m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], 
Image(BitmapEx(BMP_HOR_CNTR_LOWER)));
 m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], 
Image(BitmapEx(BMP_HOR_RGHT_LOWER)));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-02 Thread Caolán McNamara
 sc/source/filter/excel/excel.cxx |7 +--
 sw/source/filter/ww8/ww8par.cxx  |   24 +++-
 sw/source/filter/ww8/ww8par.hxx  |2 +-
 3 files changed, 25 insertions(+), 8 deletions(-)

New commits:
commit cd7a2e8c60d67701a311942f0abfe9afaae822cf
Author: Caolán McNamara 
Date:   Thu Nov 2 19:27:54 2017 +

revert drop of SetBufferSize

reported spike in load time, so still necessary I guess

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

diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index cd396d4c299d..5f9addb25489 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -121,6 +121,8 @@ ErrCode ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& 
rMedium, ScDocument*
 ErrCode eRet = SCERR_IMPORT_UNKNOWN_BIFF;
 if( pBookStrm )
 {
+pBookStrm->SetBufferSize( 0x8000 ); // still needed?
+
 XclImpRootData aImpData( eBiff, rMedium, xRootStrg, *pDocument, 
RTL_TEXTENCODING_MS_1252 );
 std::unique_ptr< ImportExcel > xFilter;
 switch( eBiff )
@@ -167,8 +169,9 @@ static ErrCode lcl_ExportExcelBiff( SfxMedium& rMedium, 
ScDocument *pDocument,
 
 // open the "Book"/"Workbook" stream
 tools::SvRef xStrgStrm = 
ScfTools::OpenStorageStreamWrite( xRootStrg, aStrmName );
-if (!xStrgStrm.is() || xStrgStrm->GetError())
-return SCERR_IMPORT_OPEN;
+if( !xStrgStrm.is() || xStrgStrm->GetError() ) return SCERR_IMPORT_OPEN;
+
+xStrgStrm->SetBufferSize( 0x8000 ); // still needed?
 
 ErrCode eRet = SCERR_IMPORT_UNKNOWN_BIFF;
 XclExpRootData aExpData( bBiff8 ? EXC_BIFF8 : EXC_BIFF5, rMedium, 
xRootStrg, *pDocument, eNach );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5caf9c1772b3..c90803a6f969 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6277,18 +6277,30 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL 
TestImportWW2(SvStream &rStream)
 return TestImportDOC(rStream, "WW6");
 }
 
-ErrCode WW8Reader::OpenMainStream(tools::SvRef& rRef)
+ErrCode WW8Reader::OpenMainStream( tools::SvRef& rRef, 
sal_uInt16& rBuffSize )
 {
 ErrCode nRet = ERR_SWG_READ_ERROR;
 OSL_ENSURE( pStg.get(), "Where is my Storage?" );
 rRef = pStg->OpenSotStream( "WordDocument", StreamMode::READ | 
StreamMode::SHARE_DENYALL);
-if (rRef.is())
-nRet = rRef->GetError();
+
+if( rRef.is() )
+{
+if( ERRCODE_NONE == rRef->GetError() )
+{
+sal_uInt16 nOld = rRef->GetBufferSize();
+rRef->SetBufferSize( rBuffSize );
+rBuffSize = nOld;
+nRet = ERRCODE_NONE;
+}
+else
+nRet = rRef->GetError();
+}
 return nRet;
 }
 
 ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, 
const OUString & /* FileName */)
 {
+sal_uInt16 nOldBuffSize = 32768;
 bool bNew = !bInsertMode; // New Doc (no inserting)
 
 tools::SvRef refStrm; // So that no one else can steal 
the Stream
@@ -6317,7 +6329,7 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& 
rBaseURL, SwPaM &rPaM, cons
 
 if( pStg.is() )
 {
-nRet = OpenMainStream(refStrm);
+nRet = OpenMainStream( refStrm, nOldBuffSize );
 pIn = refStrm.get();
 }
 else
@@ -6351,6 +6363,7 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& 
rBaseURL, SwPaM &rPaM, cons
 
 if( refStrm.is() )
 {
+refStrm->SetBufferSize( nOldBuffSize );
 refStrm.clear();
 }
 else
@@ -6378,8 +6391,9 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, 
bool bSaveRelFiles) const
 
 WW8Reader *pThis = const_cast(this);
 
+sal_uInt16 nOldBuffSize = 32768;
 tools::SvRef refStrm;
-if (!pThis->OpenMainStream(refStrm))
+if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
 {
 WW8Glossary aGloss( refStrm, 8, pStg.get() );
 bRet = aGloss.Load( rBlocks, bSaveRelFiles );
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 868858c49570..5760b1ba1a46 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -131,7 +131,7 @@ struct WW8LFOInfo;
 class WW8Reader : public StgReader
 {
 virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const 
OUString &) override;
-ErrCode OpenMainStream(tools::SvRef& rRef);
+ErrCode OpenMainStream( tools::SvRef& rRef, sal_uInt16& 
rBuffSize );
 public:
 virtual int GetReaderType() override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-26 Thread Samuel Mehrbrodt
 sc/source/filter/inc/scflt.hxx|8 
 sw/source/filter/html/css1atr.cxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 49145c2fd51d763f60d428600119bb7a0f440af2
Author: Samuel Mehrbrodt 
Date:   Tue Sep 26 17:33:21 2017 +0200

Typo: Grafic -> Graphic

Change-Id: Ic5d8ff346dfe66efb9a99e2d23c9cff514e5352a
Reviewed-on: https://gerrit.libreoffice.org/42818
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index f1640a3ed8f4..506ddf624c98 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -475,8 +475,8 @@ struct Sc10ColAttr
 // GraphHeader
 struct Sc10GraphHeader
 {
-sal_uInt8   Typ;// Type of grafic (Ole-object, Image 
(Bitmap of MetaFile), Chart-object)
-sal_Int16   CarretX;// Cell Position of grafic
+sal_uInt8   Typ;// Type of graphic (Ole-object, Image 
(Bitmap of MetaFile), Chart-object)
+sal_Int16   CarretX;// Cell Position of graphic
 sal_Int16   CarretY;
 sal_Int16   CarretZ;
 sal_Int32   x;  // x,y distance to cell border in pixels 
(pixels, as graphics are stored in window)
@@ -484,8 +484,8 @@ struct Sc10GraphHeader
 sal_Int32   w;  // w,h width and height in pixels
 sal_Int32   h;
 sal_uInt8   IsRelPos;   // position relative to cell, or absolute 
in the table
-sal_uInt8   DoPrint;// print grafic?
-sal_uInt16  FrameType;  // Frame type around grafic (none, simple, 
double, simple thick, double thick)
+sal_uInt8   DoPrint;// print graphic?
+sal_uInt16  FrameType;  // Frame type around graphic (none, 
simple, double, simple thick, double thick)
 sal_uInt8   IsTransparent;  // show background?
 Sc10Color   FrameColor; // FrameColor as RGB value
 Sc10Color   BackColor;  // BackGroundColor as RGB value
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index f49cdbb50066..db3ab306ec1f 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3149,7 +3149,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const 
SfxPoolItem& rHt,
 OUString aGraphicInBase64;
 OUString aGraphicAsLink;
 
-// Embedded Grafic -> export WriteEmbedded
+// Embedded Graphic -> export WriteEmbedded
 const Graphic* pGrf = nullptr;
 if( rHTMLWrt.mbEmbedImages || aLink.isEmpty())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-26 Thread Caolán McNamara
 sc/source/filter/xml/xmlimprt.cxx |2 ++
 sw/source/filter/xml/xmlimp.cxx   |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 99ca3a3c7214ed5d3861c0ad1f644a514857766d
Author: Caolán McNamara 
Date:   Tue Sep 26 10:21:59 2017 +0100

close sc and sw docshells too

Change-Id: I2cf06762d50736debd63f385dcae3022412ac0c0

diff --git a/sc/source/filter/xml/xmlimprt.cxx 
b/sc/source/filter/xml/xmlimprt.cxx
index a88c94fe73b9..4fe0c8e4a145 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2097,6 +2097,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL 
TestImportFODS(SvStream &rStream)
 bool ret = xFilter->filter(aArgs);
 xDocSh->SetLoading(SfxLoadedFlags::ALL);
 
+xDocSh->DoClose();
+
 return ret;
 }
 
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index c82a9303b3e3..6e1d0e70e1f6 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1592,6 +1592,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL 
TestImportFODT(SvStream &rStream)
 bool ret = xFilter->filter(aArgs);
 xDocSh->SetLoading(SfxLoadedFlags::ALL);
 
+xDocSh->DoClose();
+
 return ret;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-17 Thread Stephan Bergmann
 sc/source/ui/miscdlgs/autofmt.cxx |4 
 sw/source/ui/table/tautofmt.cxx   |4 
 2 files changed, 8 insertions(+)

New commits:
commit 2f976709bca1fc58e3846ceaea562af85e9a92e0
Author: Stephan Bergmann 
Date:   Thu Nov 17 14:32:07 2016 +0100

Avoid -fsanitize=signed-integer-overflow

Both Writer: "Table - Insert Table... - Insert", "Table - AutoFormat 
Styles...";
and Calc: select multiple cells, "Format - AutoFormat Styles..." cause

> svx/source/dialog/framelinkarray.cxx:82:29: runtime error: signed integer 
overflow: -4702111234474983744 + -4702111234474983746 cannot be represented in 
type 'long'
> #0 0x7f84ef0e36ba in 
svx::frame::lclRecalcCoordVec(std::__debug::vector 
>&, std::__debug::vector > const&) 
svx/source/dialog/framelinkarray.cxx:82:29
> #1 0x7f84ef0e780e in svx::frame::ArrayImpl::GetColPosition(unsigned 
long) const svx/source/dialog/framelinkarray.cxx:265:9
> #2 0x7f84ef0f95ae in svx::frame::Array::GetColPosition(unsigned long) 
const svx/source/dialog/framelinkarray.cxx:762:20
> #3 0x7f84ef0f9e56 in svx::frame::Array::GetWidth() const 
svx/source/dialog/framelinkarray.cxx:787:12
> #4 0x7f852e9df8fd in ScAutoFmtPreview::CalcCellArray(bool) 
sc/source/ui/miscdlgs/autofmt.cxx:429:32
> #5 0x7f852e9c7740 in ScAutoFmtPreview::Init() 
sc/source/ui/miscdlgs/autofmt.cxx:407:5
> #6 0x7f852e9c9102 in ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window*) 
sc/source/ui/miscdlgs/autofmt.cxx:73:5

where -4702111234474983746 = 0xbebebebebebebebe is ASan's uninitialized 
value
stored into ScAutoFmtPreview::mnLableColWidth et al.  Those (overflowing, 
even)
computations on uninitialized values appear to be harmless in practice, 
though,
presumably because they are overwritten with "real" values soon after.

Change-Id: I487fc4681afe79c4e8532595226cba4c9c0c9b2d

diff --git a/sc/source/ui/miscdlgs/autofmt.cxx 
b/sc/source/ui/miscdlgs/autofmt.cxx
index 976c79e..4e7b9e4 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -404,6 +404,10 @@ void ScAutoFmtPreview::Init()
 SetBorderStyle( WindowBorderStyle::MONO );
 maArray.Initialize( 5, 5 );
 maArray.SetUseDiagDoubleClipping( false );
+mnLabelColWidth = 0;
+mnDataColWidth1 = 0;
+mnDataColWidth2 = 0;
+mnRowHeight = 0;
 CalcCellArray( false );
 CalcLineMap();
 }
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index df74f78..8cce069 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -825,6 +825,10 @@ void AutoFormatPreview::Init()
 SetBorderStyle( GetBorderStyle() | WindowBorderStyle::MONO );
 maArray.Initialize( 5, 5 );
 maArray.SetUseDiagDoubleClipping( false );
+nLabelColWidth = 0;
+nDataColWidth1 = 0;
+nDataColWidth2 = 0;
+nRowHeight = 0;
 CalcCellArray( false );
 CalcLineMap();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-07 Thread Noel Grandin
 sc/source/ui/view/cellsh1.cxx  |   12 ++--
 sw/source/uibase/fldui/fldwrap.cxx |2 +-
 sw/source/uibase/uiview/view2.cxx  |4 ++--
 vcl/source/window/layout.cxx   |2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit febde9d61d1ee848f7b10edfd5954a25b6687946
Author: Noel Grandin 
Date:   Mon Nov 7 10:41:17 2016 +0200

wrap some more dialog pointers in VclPtr

and fix a couple of memory leaks in the process, some of them were
not being deleted at all

Change-Id: Icb5c948662ad3ba878eadfbc807f93cc35cfb228
Reviewed-on: https://gerrit.libreoffice.org/30651
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 12f1f31..f661f34 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1079,8 +1079,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-AbstractScDPShowDetailDlg* pDlg = 
pFact->CreateScDPShowDetailDlg(
-pTabViewShell->GetDialogParent(), *pDPObj, 
nOrientation );
+ScopedVclPtr pDlg( 
pFact->CreateScDPShowDetailDlg(
+pTabViewShell->GetDialogParent(), *pDPObj, 
nOrientation ) );
 OSL_ENSURE(pDlg, "Dialog create fail!");
 if ( pDlg->Execute() == RET_OK )
 {
@@ -1120,9 +1120,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 OSL_ENSURE( pFact, "ScAbstractFactory create fail!" );
 Date aNullDate( 
*GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() );
-AbstractScDPDateGroupDlg* pDlg = 
pFact->CreateScDPDateGroupDlg(
+ScopedVclPtr pDlg( 
pFact->CreateScDPDateGroupDlg(
 pTabViewShell->GetDialogParent(),
-aNumInfo, nParts, aNullDate );
+aNumInfo, nParts, aNullDate ) );
 OSL_ENSURE( pDlg, "Dialog create fail!" );
 if( pDlg->Execute() == RET_OK )
 {
@@ -1134,8 +1134,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 {
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 OSL_ENSURE( pFact, "ScAbstractFactory create fail!" );
-AbstractScDPNumGroupDlg* pDlg = 
pFact->CreateScDPNumGroupDlg(
-pTabViewShell->GetDialogParent(), aNumInfo );
+ScopedVclPtr pDlg( 
pFact->CreateScDPNumGroupDlg(
+pTabViewShell->GetDialogParent(), aNumInfo ) );
 OSL_ENSURE( pDlg, "Dialog create fail!" );
 if( pDlg->Execute() == RET_OK )
 pTabViewShell->NumGroupDataPilot( 
pDlg->GetGroupInfo() );
diff --git a/sw/source/uibase/fldui/fldwrap.cxx 
b/sw/source/uibase/fldui/fldwrap.cxx
index 153f15a..38b45e5 100644
--- a/sw/source/uibase/fldui/fldwrap.cxx
+++ b/sw/source/uibase/fldui/fldwrap.cxx
@@ -125,7 +125,7 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( 
vcl::Window* _pParent, sal
 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
-AbstractSwFieldDlg* pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent);
+VclPtr pDlg = pFact->CreateSwFieldDlg(pB, this, 
_pParent);
 OSL_ENSURE(pDlg, "Dialog creation failed!");
 pDlgInterface = pDlg;
 
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 9cd0adc..8865d29 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1138,7 +1138,7 @@ void SwView::Execute(SfxRequest &rReq)
 SfxViewFrame* pTmpFrame = GetViewFrame();
 SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "Dialog creation failed!");
-AbstractMailMergeCreateFromDlg* pDlg = 
pFact->CreateMailMergeCreateFromDlg(&pTmpFrame->GetWindow());
+ScopedVclPtr pDlg( 
pFact->CreateMailMergeCreateFromDlg(&pTmpFrame->GetWindow()) );
 OSL_ENSURE(pDlg, "Dialog creation failed!");
 if(RET_OK == pDlg->Execute())
 bUseCurrentDocument = pDlg->IsThisDocument();
@@ -2340,7 +2340,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
 //take an existing data source or create a new one?
 SwAbstractDialogFactory* pFact = 
SwAbstractDi

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

2016-10-22 Thread Caolán McNamara
 sc/source/filter/excel/xicontent.cxx |2 
 sw/source/filter/ww8/ww8par.cxx  |   91 ++-
 2 files changed, 81 insertions(+), 12 deletions(-)

New commits:
commit 4f07175cd03bf0fa42992a06d51aed5b421adcf2
Author: Caolán McNamara 
Date:   Sat Oct 22 21:08:07 2016 +0100

implement CryptoAPI RC4+SHA1 encryption scheme for doc import

there might be other variants out there in practice, but this
works for default encrypted doc of word 2013

Change-Id: I995a0437d4001d63e1c3a821e00c05a2af429356

diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index c854d75..bb80a92 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1152,7 +1152,7 @@ XclImpDecrypterRef lclReadFilepass8_Strong(XclImpStream& 
rStream)
 rStream.Ignore(nHeaderSize - actualHeaderSize);
 
 info.verifier.saltSize = rStream.ReaduInt32();
-if (info.verifier.saltSize != 16)
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
 return xDecr;
 rStream.Read(&info.verifier.salt, sizeof(info.verifier.salt));
 rStream.Read(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0b8b04a..f1647b85 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5632,6 +5632,63 @@ namespace
 }
 }
 
+//TO-DO: merge this with lclReadFilepass8_Strong in sc which uses a different
+//stream thing
+static bool lclReadCryptoAPIHeader(msfilter::RC4EncryptionInfo &info, SvStream 
&rStream)
+{
+//Its possible there are other variants in existance but these
+//are the defaults I get with Word 2013
+
+rStream.ReadUInt32(info.header.flags);
+if (oox::getFlag( info.header.flags, msfilter::ENCRYPTINFO_EXTERNAL))
+return false;
+
+sal_uInt32 nHeaderSize(0);
+rStream.ReadUInt32(nHeaderSize);
+sal_uInt32 actualHeaderSize = sizeof(info.header);
+
+if (nHeaderSize < actualHeaderSize)
+return false;
+
+rStream.ReadUInt32(info.header.flags);
+rStream.ReadUInt32(info.header.sizeExtra);
+rStream.ReadUInt32(info.header.algId);
+rStream.ReadUInt32(info.header.algIdHash);
+rStream.ReadUInt32(info.header.keyBits);
+rStream.ReadUInt32(info.header.providedType);
+rStream.ReadUInt32(info.header.reserved1);
+rStream.ReadUInt32(info.header.reserved2);
+
+rStream.SeekRel(nHeaderSize - actualHeaderSize);
+
+rStream.ReadUInt32(info.verifier.saltSize);
+if (info.verifier.saltSize != msfilter::SALT_LENGTH)
+return false;
+rStream.ReadBytes(&info.verifier.salt, sizeof(info.verifier.salt));
+rStream.ReadBytes(&info.verifier.encryptedVerifier, 
sizeof(info.verifier.encryptedVerifier));
+
+rStream.ReadUInt32(info.verifier.encryptedVerifierHashSize);
+if (info.verifier.encryptedVerifierHashSize != RTL_DIGEST_LENGTH_SHA1)
+return false;
+rStream.ReadBytes(&info.verifier.encryptedVerifierHash, 
info.verifier.encryptedVerifierHashSize);
+
+// check flags and algorithm IDs, required are AES128 and SHA-1
+if (!oox::getFlag(info.header.flags, msfilter::ENCRYPTINFO_CRYPTOAPI))
+return false;
+
+if (oox::getFlag(info.header.flags, msfilter::ENCRYPTINFO_AES))
+return false;
+
+if (info.header.algId != msfilter::ENCRYPT_ALGO_RC4)
+return false;
+
+// hash algorithm ID 0 defaults to SHA-1 too
+if (info.header.algIdHash != 0 && info.header.algIdHash != 
msfilter::ENCRYPT_HASH_SHA1)
+return false;
+
+return true;
+}
+
 sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
 {
 sal_uLong nErrRet = 0;
@@ -5691,7 +5748,6 @@ sal_uLong 
SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
 {
 switch (eAlgo)
 {
-case RC4CryptoAPI:
 default:
 nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
 break;
@@ -5740,22 +5796,35 @@ sal_uLong 
SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
 }
 break;
 case RC4:
+case RC4CryptoAPI:
 {
-sal_uInt8 aDocId[ 16 ];
-sal_uInt8 aSaltData[ 16 ];
-sal_uInt8 aSaltHash[ 16 ];
+std::unique_ptr xCtx;
+msfilter::RC4EncryptionInfo info;
+bool bCouldReadHeaders;
 
-bool bCouldReadHeaders =
-checkRead(*m_pTableStream, aDocId, 16) &&
-checkRead(*m_pTableStream, aSaltData, 16) &&
-checkRead(*m_pTableStream, aSaltHash, 16);
+if (eAlgo == RC4)
+{
+xCtx.reset(new msfilter::MSCodec_Std97);
+assert(sizeof(info.verif

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

2016-04-04 Thread Noel Grandin
 sc/source/core/data/fillinfo.cxx |2 +-
 sw/source/uibase/dbui/dbmgr.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0085eb42fdb7cceece11004841c50f3008c9e120
Author: Noel Grandin 
Date:   Mon Apr 4 09:59:56 2016 +0200

cppcheck:passedByValue

Change-Id: Ideb62ec1838463f65fc763650294e4fa311567f1
Reviewed-on: https://gerrit.libreoffice.org/23797
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index b32f483..53f0bce 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -338,7 +338,7 @@ void initColWidths(RowInfo* pRowInfo, ScDocument* pDoc, 
double fColScale, SCTAB
 }
 }
 
-bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const 
std::vector rCondFormats,
+bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const 
std::vector& rCondFormats,
 CellInfo* pInfo, ScStyleSheetPool* pStlPool,
 const ScAddress& rAddr, bool& bHidden, bool& bHideFormula, bool 
bTabProtect)
 {
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 75fa402..5d4914f 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -888,7 +888,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell 
*xTargetDocShell,
 
 static bool lcl_SaveDoc(
 const INetURLObject* pFileURL,
-const std::shared_ptr pStoreToFilter,
+const std::shared_ptr& pStoreToFilter,
 const OUString* pStoreToFilterOptions,
 const uno::Sequence< beans::PropertyValue >* pSaveToFilterData,
 const bool bIsPDFexport,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-19 Thread Noel Grandin
 sc/source/ui/vba/vbaformat.cxx|   12 +++-
 sc/source/ui/vba/vbastyle.cxx |   13 +++--
 sc/source/ui/vba/vbastyle.hxx |1 -
 sw/source/filter/ww8/wrtw8nds.cxx |3 +--
 sw/source/filter/ww8/wrtww8.cxx   |1 -
 sw/source/filter/ww8/wrtww8.hxx   |1 -
 6 files changed, 23 insertions(+), 8 deletions(-)

New commits:
commit 6be5ed60e1823d909511c6af48e6bdc2817cce7c
Author: Noel Grandin 
Date:   Mon Oct 19 10:03:31 2015 +0200

cppcheck:nullPointerRedundantCheck

second time lucky

Change-Id: I1ff8c750f5845180a0bcd23ac5017e8cd0331409

diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 42aaa8f..1896a12 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -50,7 +50,17 @@ using namespace ::com::sun::star;
 #define LOCALE "Locale"
 
 template< typename... Ifc >
-ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& 
xParent, const uno::Reference< uno::XComponentContext > & xContext, const 
uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< 
frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( 
script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), 
m_aDefaultLocale( OUString("en"), OUString( "US"), OUString() ), mxPropertySet( 
_xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), 
mbAddIndent( false )
+ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& 
xParent,
+const uno::Reference< 
uno::XComponentContext > & xContext,
+const uno::Reference< beans::XPropertySet 
>& _xPropertySet,
+const uno::Reference< frame::XModel >& 
xModel,
+bool bCheckAmbiguoity ) throw ( 
script::BasicErrorException )
+: ScVbaFormat_BASE( xParent, xContext ),
+  m_aDefaultLocale( OUString("en"), OUString( "US"), OUString() ),
+  mxPropertySet( _xPropertySet ),
+  mxModel( xModel ),
+  mbCheckAmbiguoity( bCheckAmbiguoity ),
+  mbAddIndent( false )
 {
 try
 {
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index 15f7b90..6c96083 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -57,7 +57,11 @@ void ScVbaStyle::initialise() throw ( uno::RuntimeException, 
script::BasicErrorE
 
 }
 
-ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, 
const uno::Reference< uno::XComponentContext > & xContext, const OUString& 
sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( 
script::BasicErrorException, uno::RuntimeException ) :  ScVbaStyle_BASE( 
xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false ), 
mxModel( _xModel )
+ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent,
+const uno::Reference< uno::XComponentContext > & 
xContext,
+const OUString& sStyleName, const uno::Reference< 
frame::XModel >& _xModel )
+throw ( script::BasicErrorException, uno::RuntimeException 
)
+:  ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, 
_xModel ), _xModel, false )
 {
 try
 {
@@ -69,7 +73,12 @@ ScVbaStyle::ScVbaStyle( const uno::Reference< 
ov::XHelperInterface >& xParent, c
 }
 }
 
-ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, 
const uno::Reference< uno::XComponentContext > & xContext, const 
uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< 
frame::XModel >& _xModel ) throw ( script::BasicErrorException, 
uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, 
_xModel, false ),  mxModel( _xModel )
+ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent,
+const uno::Reference< uno::XComponentContext > & 
xContext,
+const uno::Reference< beans::XPropertySet >& 
_xPropertySet,
+const uno::Reference< frame::XModel >& _xModel )
+throw ( script::BasicErrorException, uno::RuntimeException 
)
+: ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
 {
 try
 {
diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx
index 0e5ea95..efeed19 100644
--- a/sc/source/ui/vba/vbastyle.hxx
+++ b/sc/source/ui/vba/vbastyle.hxx
@@ -32,7 +32,6 @@ class ScVbaStyle : public ScVbaStyle_BASE
 {
 protected:
 css::uno::Reference< css::style::XStyle > mxStyle;
-css::uno::Reference< css::frame::XModel > mxModel;
 css::uno::Reference< css::container::XNameContainer > 
mxStyleFamilyNameContainer;
 void initialise() throw ( css::uno::RuntimeException, 
css::script::BasicErrorException );
 public:
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index f3da842..66df

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

2015-07-13 Thread Maxim Monastirsky
 sc/source/ui/view/tabvwsh2.cxx   |   12 
 sw/source/uibase/uiview/viewstat.cxx |5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 107a4740f63860f0901f51217b16cefa62a827ac
Author: Maxim Monastirsky 
Date:   Mon Jul 13 20:23:39 2015 +0300

tdf#39478 Fix custom shapes status update

In sw it was still returning a string item, although the
slot type was changed to boolean back in 2005 with
4cce2a2f08238e1e03055877aa89bc755ec06f59.

In sc the status update was simply missing.

Change-Id: I8a6dd157d1e401754b3a9a93dc83458dcdd4f089

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 1efe8d6..fefe124 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -434,6 +434,18 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
 case SID_OBJECT_SELECT: // wichtig fuer den ollen 
Control-Controller
 rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == SID_OBJECT_SELECT 
&& IsDrawSelMode() ) );
 break;
+
+case SID_DRAWTBX_CS_BASIC:
+case SID_DRAWTBX_CS_SYMBOL:
+case SID_DRAWTBX_CS_ARROW:
+case SID_DRAWTBX_CS_FLOWCHART:
+case SID_DRAWTBX_CS_CALLOUT:
+case SID_DRAWTBX_CS_STAR:
+{
+bool bCurrentActive = (nDrawSfxId == nWhich) && 
(aCurrShapeEnumCommand[ nWhich - SID_DRAWTBX_CS_BASIC ] == sDrawCustom);
+rSet.Put( SfxBoolItem( nWhich, bCurrentActive ) );
+}
+break;
 }
 nWhich = aIter.NextWhich();
 }
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index cfc2f02..aabd463 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -550,7 +550,10 @@ void SwView::GetDrawState(SfxItemSet &rSet)
 if ( bWeb )
 rSet.DisableItem( nWhich );
 else
-rSet.Put(SfxStringItem(nWhich, m_aCurrShapeEnumCommand[ nWhich 
- SID_DRAWTBX_CS_BASIC ] ));
+{
+bool bCurrentActive = (m_nDrawSfxId == nWhich) && 
(m_aCurrShapeEnumCommand[ nWhich - SID_DRAWTBX_CS_BASIC ] == m_sDrawCustom);
+rSet.Put( SfxBoolItem( nWhich, bCurrentActive ) );
+}
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-07 Thread Michael Meeks
 sc/source/ui/view/prevwsh.cxx  |3 +--
 sc/source/ui/view/tabvwsh4.cxx |5 ++---
 sw/source/uibase/sidebar/PagePropertyPanel.cxx |   10 +++---
 sw/source/uibase/uiview/viewprt.cxx|4 +---
 4 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit a3deb4866890ca6d4a41df0f08107eb75b132716
Author: Michael Meeks 
Date:   Thu May 7 13:16:13 2015 +0100

tdf#91127 - audit for unfortunate SAL_NO_ACQUIRE referencing issues.

Change-Id: I738f3ea1bf9f003f2b146cda0a8f986375eacd2b

diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 970eff0..b188464 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -538,8 +538,7 @@ VclPtr ScPreviewShell::CreatePrintOptionsPage( 
vcl::Window *pParent,
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( 
RID_SCPAGE_PRINT );
 if ( ScTpPrintOptionsCreate )
-return VclPtr((*ScTpPrintOptionsCreate)( pParent, 
&rOptions),
-  SAL_NO_ACQUIRE);
+return ScTpPrintOptionsCreate( pParent, &rOptions );
 return VclPtr();
 }
 
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index dc2817d..64a6e9f 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1067,10 +1067,9 @@ VclPtr 
ScTabViewShell::CreatePrintOptionsPage( vcl::Window *pParent,
 {
 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
-::CreateTabPage ScTpPrintOptionsCreate =pFact->GetTabPageCreatorFunc( 
RID_SCPAGE_PRINT );
+::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( 
RID_SCPAGE_PRINT );
 if ( ScTpPrintOptionsCreate )
-return VclPtr((*ScTpPrintOptionsCreate)( pParent, 
&rOptions),
-  SAL_NO_ACQUIRE);
+return ScTpPrintOptionsCreate( pParent, &rOptions );
 return VclPtr();
 }
 
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx 
b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 73bf32b..0d0ac10 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -95,13 +95,9 @@ VclPtr PagePropertyPanel::Create (
 if (pBindings == NULL)
 throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings 
given to PagePropertyPanel::Create", NULL, 2);
 
-return VclPtr(
-VclPtr::Create(
-
-pParent,
-rxFrame,
-pBindings),
-SAL_NO_ACQUIRE);
+return VclPtr::Create( pParent,
+  rxFrame,
+  pBindings);
 }
 
 PagePropertyPanel::PagePropertyPanel(
diff --git a/sw/source/uibase/uiview/viewprt.cxx 
b/sw/source/uibase/uiview/viewprt.cxx
index 76cbdb3..012e0dd 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -259,9 +259,7 @@ VclPtr CreatePrintOptionsPage( vcl::Window 
*pParent,
 if (!fnCreatePage)
 return NULL;
 
-VclPtr pPage =
-VclPtr((*fnCreatePage)(pParent, &rOptions),
-   SAL_NO_ACQUIRE);
+VclPtr pPage = fnCreatePage(pParent, &rOptions);
 OSL_ENSURE(pPage, "No page");
 if (!pPage)
 return NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-28 Thread Yousuf Philips
 sc/source/ui/drawfunc/objdraw.src |  140 --
 sw/source/ui/app/mn.src   |   18 
 2 files changed, 158 deletions(-)

New commits:
commit 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9
Author: Yousuf Philips 
Date:   Mon Apr 27 10:51:27 2015 +0400

tdf#86606 Removal of additional direct formatting

Change-Id: Ied176f9e90b78ad2437fe8c6037508be231f6ebe
Reviewed-on: https://gerrit.libreoffice.org/15547
Tested-by: Jenkins 
Tested-by: David Tardon 
Reviewed-by: David Tardon 

diff --git a/sc/source/ui/drawfunc/objdraw.src 
b/sc/source/ui/drawfunc/objdraw.src
index 065fdf8..b8cbe40 100644
--- a/sc/source/ui/drawfunc/objdraw.src
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -31,135 +31,6 @@
 Text [ en-US ] = "~Default" ; \
 };
 
- // Font (SID_ATTR_CHAR_FONT) und Groesse (SID_ATTR_CHAR_FONTHEIGHT) duerfen 
nicht im
- // Formatmenue auftauchen, weil die Controller im ExeEnv sonst im Container 
angelegt werden
-#define MN_TEXT_ATTR\
-MenuItem\
-{\
-Identifier = RID_MN_FORMAT_STYLE ; \
-HelpID = HID_MN_FORMAT_STYLE ; \
-Text [ en-US ] = "~Style" ; \
-SubMenu = Menu\
-{\
-ItemList = \
-{\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_WEIGHT\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_POSTURE\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_OVERLINE\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_UNDERLINE\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_SHADOWED\
-};\
-MenuItem\
-{\
-ITEM_FORMAT_ATTR_CHAR_CONTOUR\
-};\
-MenuItem\
-{\
-Separator = TRUE ; \
-};\
-MenuItem\
-{\
-Identifier = SID_SET_SUPER_SCRIPT ; \
-HelpID = CMD_SID_SET_SUPER_SCRIPT ; \
-Text [ en-US ] = "~Superscript" ; \
-};\
-MenuItem\
-{\
-Identifier = SID_SET_SUB_SCRIPT ; \
-HelpID = CMD_SID_SET_SUB_SCRIPT ; \
-Text [ en-US ] = "S~ubscript" ; \
-};\
-};\
-};\
-};\
-MenuItem\
-{\
-Identifier = RID_MN_FORMAT_ALGN ; \
-HelpID = HID_MN_FORMAT_ALGN ; \
-Text [ en-US ] = "~Alignment" ; \
-RadioCheck = TRUE ; \
-SubMenu = Menu\
-{\
-ItemList = \
-{\
-MenuItem\
-{\
-Identifier = SID_ALIGNLEFT ; \
-HelpID = CMD_SID_ATTR_PARA_ADJUST_LEFT ; \
-RadioCheck = TRUE ; \
-Text [ en-US ] = "~Left" ;\
-};\
-MenuItem\
-{\
-Identifier = SID_ALIGNRIGHT ; \
-HelpID = CMD_SID_ATTR_PARA_ADJUST_RIGHT ; \
-RadioCheck = TRUE ; \
-Text [ en-US ] = "~Right" ;\
-};\
-MenuItem\
-{\
-Identifier = SID_ALIGNCENTERHOR ; \
-HelpID = CMD_SID_ATTR_PARA_ADJUST_CENTER ; \
-RadioCheck = TRUE ; \
-Text [ en-US ] = "~Centered" ;\
-};\
-MenuItem\
-{\
-Identifier = SID_ALIGNBLOCK ; \
-HelpID = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \
-RadioCheck = TRUE ; \
-Text [ en-US ] = "~Justified" ; \
-};\
-};\
-};\
-};\
-MenuItem\
-{\
-Identifier = RID_MN_FORMAT_LINESPACE ; \
-HelpID = HID_MN_FORMAT_LINESPACE ; \
-Text [ en-US ] = "~Line Spacing" ; \
-_MenuItemFlags = MIB_RADIOCHECK ; \
-SubMenu = Menu\
-{\
-ItemList = \
-{\
-MenuItem\
-{\
-ITEM_FORMAT_PARA_LINESPACE_10\
-RadioCheck = TRUE ; \
-};\
-MenuItem\
-{\
-ITEM_FORMAT_PARA_LINESPACE_15\
-RadioCheck = TRUE ; \
-};\
-MenuItem\
-{\
-ITEM_FORMAT_PARA_LINESPACE_20\
-RadioCheck = TRUE ; \
-};\
-};\
-};\
-};
-
 #define MN_DRWTXT \
 MenuItem\

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

2014-12-09 Thread Jan Holesovsky
 sc/source/ui/sidebar/ScPanelFactory.cxx |   12 +---
 sw/source/uibase/sidebar/SwPanelFactory.cxx |8 +++-
 2 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit a9585f343b1642c119721de23dccf748de3c094a
Author: Jan Holesovsky 
Date:   Tue Dec 9 14:56:31 2014 +0100

No need to use a macro here.

diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx 
b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 6f7fdf9..a53ae72 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -108,8 +108,7 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 "PanelFactory::createUIElement called without SfxBindings",
 NULL);
 
-#define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
-if (DoesResourceEndWith("/AlignmentPropertyPanel"))
+if (rsResourceURL.endsWith("/AlignmentPropertyPanel"))
 {
 AlignmentPropertyPanel* pPanel = AlignmentPropertyPanel::Create( 
pParentWindow, xFrame, pBindings );
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -118,7 +117,7 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(-1,-1,-1));
 }
-else if (DoesResourceEndWith("/CellAppearancePropertyPanel"))
+else if (rsResourceURL.endsWith("/CellAppearancePropertyPanel"))
 {
 CellAppearancePropertyPanel* pPanel = 
CellAppearancePropertyPanel::Create( pParentWindow, xFrame, pBindings );
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -127,7 +126,7 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(-1,-1,-1));
 }
-else if (DoesResourceEndWith("/NumberFormatPropertyPanel"))
+else if (rsResourceURL.endsWith("/NumberFormatPropertyPanel"))
 {
 NumberFormatPropertyPanel* pPanel = 
NumberFormatPropertyPanel::Create( pParentWindow, xFrame, pBindings );
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -136,7 +135,7 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(-1,-1,-1));
 }
-else if (DoesResourceEndWith("/NavigatorPanel"))
+else if (rsResourceURL.endsWith("/NavigatorPanel"))
 {
 vcl::Window* pPanel = new ScNavigatorDlg(pBindings, NULL, 
pParentWindow, false);
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -145,7 +144,7 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(0,-1,-1));
 }
-else if (DoesResourceEndWith("/FunctionsPanel"))
+else if (rsResourceURL.endsWith("/FunctionsPanel"))
 {
 vcl::Window* pPanel = new ScFunctionDockWin(pBindings, NULL, 
pParentWindow, ScResId(FID_FUNCTION_BOX));
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -154,7 +153,6 @@ Reference SAL_CALL 
ScPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(0,-1,-1));
 }
-#undef DoesResourceEndWith
 }
 catch (const uno::RuntimeException &)
 {
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx 
b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index f2c085e..4acd661 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -102,8 +102,7 @@ Reference SAL_CALL 
SwPanelFactory::createUIElement (
 "PanelFactory::createUIElement called without SfxBindings",
 NULL);
 
-#define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
-if (DoesResourceEndWith("/PagePropertyPanel"))
+if (rsResourceURL.endsWith("/PagePropertyPanel"))
 {
 sw::sidebar::PagePropertyPanel* pPanel = 
sw::sidebar::PagePropertyPanel::Create( pParentWindow, xFrame, pBindings );
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -112,7 +111,7 @@ Reference SAL_CALL 
SwPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(-1,-1,-1));
 }
-else if (DoesResourceEndWith("/WrapPropertyPanel"))
+else if (rsResourceURL.endsWith("/WrapPropertyPanel"))
 {
 sw::sidebar::WrapPropertyPanel* pPanel = 
sw::sidebar::WrapPropertyPanel::Create( pParentWindow, xFrame, pBindings );
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -121,7 +120,7 @@ Reference SAL_CALL 
SwPanelFactory::createUIElement (
 pPanel,
 ui::LayoutSize(-1,-1,-1));
 }
-else if (DoesResourceEndWith("/NavigatorPanel"))
+else if (rsResourceURL.endsWith("/NavigatorPanel"))
 {
 vcl::Window* pPanel = new SwNavigationPI(pBindings, NULL, 
pParentWindow);
 xElement = sfx2::sidebar::SidebarPanelBase::Create(
@@ -130,7 +129,6 @@ Reference SAL_CALL 
SwPanelFactory::createUIElement (
 pPanel,
 

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

2014-11-18 Thread Samuel Mehrbrodt
 sc/source/ui/view/cellsh3.cxx |3 --
 sc/source/ui/view/tabvwsh3.cxx|3 --
 sw/source/uibase/uiview/view2.cxx |   53 --
 3 files changed, 59 deletions(-)

New commits:
commit ebabf6d1fa648d62dd63529e9fe64dcb631caee8
Author: Samuel Mehrbrodt 
Date:   Sat Nov 8 23:02:11 2014 +0100

fdo#86018 Don't do anything when clicked on placeholder in statusbar

No idea why this code got executed in sw, it has no action in sd and sc.

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

diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index a94de11..a302534 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -101,9 +101,6 @@ void ScCellShell::Execute( SfxRequest& rReq )
 
 switch ( nSlot )
 {
-case SID_ATTR_SIZE://XXX ???
-break;
-
 case SID_COLLABORATION:
 #if ENABLE_TELEPATHY
 
GetViewData()->GetDocShell()->GetCollaboration()->DisplayContacts();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 6b0cb71..312ff21 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -473,9 +473,6 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 rReq.Ignore();//XXX wird von SFX erledigt
 }
 
-case SID_ATTR_SIZE://XXX ???
-break;
-
 case SID_PRINTPREVIEW:
 {
 if ( !pThisFrame->GetFrame().IsInPlace() )  // nicht 
bei OLE
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 7aca2c1..7dcde99 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1485,26 +1485,6 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
 rSet.DisableItem( SID_ATTR_ZOOMSLIDER );
 }
 break;
-case SID_ATTR_POSITION:
-case SID_ATTR_SIZE:
-{
-if( !rShell.IsFrmSelected() && !rShell.IsObjSelected() )
-SwBaseShell::_SetFrmMode( FLY_DRAG_END );
-else
-{
-FlyMode eFrameMode = SwBaseShell::GetFrmMode();
-if ( eFrameMode == FLY_DRAG_START || eFrameMode == 
FLY_DRAG )
-{
-if ( nWhich == SID_ATTR_POSITION )
-rSet.Put( SfxPointItem( SID_ATTR_POSITION,
-
rShell.GetAnchorObjDiff()));
-else
-rSet.Put( SvxSizeItem( SID_ATTR_SIZE,
-   rShell.GetObjSize()));
-}
-}
-}
-break;
 case SID_TABLE_CELL:
 
 if( rShell.IsFrmSelected() || rShell.IsObjSelected() )
@@ -1796,39 +1776,6 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
 }
 break;
 
-case SID_ATTR_SIZE:
-{
-sal_uInt16 nId = FN_INSERT_FIELD;
-if( rSh.IsCrsrInTbl() )
-nId = FN_FORMAT_TABLE_DLG;
-else if( rSh.GetCurTOX() )
-nId = FN_INSERT_MULTI_TOX;
-else if( rSh.GetCurrSection() )
-nId = FN_EDIT_REGION;
-else
-{
-const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCrsrPos();
-if( pNumRule )  // cursor in numbering
-{
-if( pNumRule->IsAutoRule() )
-nId = FN_NUMBER_BULLETS;
-else
-{
-// start dialog of the painter
-nId = 0;
-}
-}
-else if( rSh.IsFrmSelected() )
-nId = FN_FORMAT_FRAME_DLG;
-else if( rSh.IsObjSelected() )
-nId = SID_ATTR_TRANSFORM;
-}
-if( nId )
-GetViewFrame()->GetDispatcher()->Execute(nId,
-SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
-}
-break;
-
 case FN_STAT_SELMODE:
 {
 if ( pArgs )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-30 Thread Stanislav Horacek
 sc/source/ui/navipi/navipi.src |2 +-
 sw/source/ui/utlui/utlui.src   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7fa690d1df4f79f129af28319381e1fd83e1b178
Author: Stanislav Horacek 
Date:   Fri Jun 27 18:52:15 2014 +0200

related fdo#70998 change names in Navigator to plural

to be consistent with names of other items

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

diff --git a/sc/source/ui/navipi/navipi.src b/sc/source/ui/navipi/navipi.src
index cbb59f4..7b68de7 100644
--- a/sc/source/ui/navipi/navipi.src
+++ b/sc/source/ui/navipi/navipi.src
@@ -281,7 +281,7 @@ String SCSTR_CONTENT_DBAREA
 
 String SCSTR_CONTENT_GRAPHIC
 {
-Text [ en-US ] = "Image" ;
+Text [ en-US ] = "Images" ;
 };
 
 String SCSTR_CONTENT_OLEOBJECT
diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src
index f2ed93c..ee722c0 100644
--- a/sw/source/ui/utlui/utlui.src
+++ b/sw/source/ui/utlui/utlui.src
@@ -185,7 +185,7 @@ String STR_CONTENT_TYPE_FRAME
 };
 String STR_CONTENT_TYPE_GRAPHIC
 {
-Text [ en-US ] = "Image" ;
+Text [ en-US ] = "Images" ;
 };
 String STR_CONTENT_TYPE_OLE
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-01-30 Thread Philipp Weissenbacher
 sc/source/ui/docshell/docsh.cxx   |2 
 sw/source/core/layout/flowfrm.cxx |5 --
 sw/source/core/layout/fly.cxx |   83 ++
 3 files changed, 43 insertions(+), 47 deletions(-)

New commits:
commit 1c3ce40d97bffca5ea3df3e0f5bbac74a01846fb
Author: Philipp Weissenbacher 
Date:   Fri Jan 31 00:13:56 2014 +0100

Translate German comments and fix a few missed one

Change-Id: Ieb5798a98453d0a6b0e368f7444150c758a9c7ac
Reviewed-on: https://gerrit.libreoffice.org/7753
Tested-by: Markus Mohrhard 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 4f3bbf0..5c4e728 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1473,7 +1473,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 aMark.SetMarkArea( aColWidthRange );
 aMark.MarkToMulti();
 
-// Order is important: First width, then height (cf. WHAT?! 
hund.rtf)
+// Order is important: First width, then height
 if ( bSetColWidths )
 {
 for ( SCCOL nCol=0; nCol <= nEndCol; nCol++ )
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index dd88178..cadb1c2 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1071,8 +1071,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
 |*
 |*  SwFrm::GetPrevLeaf()
 |*
-|*  BeschreibungReturns the previous layout leaf where we can move
-|*  the frame.
+|*  Returns the previous layout leaf where we can move the frame.
 |*
 |*/
 
@@ -2540,7 +2539,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
 PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, 0 );
 if ( pNewUpper->IsFtnContFrm() )
 {
-//Kann sein, dass ich einen Container bekam.
+// I may have gotten a Container
 SwFtnFrm *pOld = m_rThis.FindFtnFrm();
 SwFtnFrm *pNew = new SwFtnFrm( pOld->GetFmt(), pOld,
pOld->GetRef(), pOld->GetAttr() );
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 677677b..1a2291d 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -87,7 +87,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm 
*pAnch ) :
 bLocked  = bMinHeight =
 bHeightClipped = bWidthClipped = bFormatHeightOnly = sal_False;
 
-//Grosseneinstellung, Fixe groesse ist immer die Breite
+// Size setting: Fixed size is always the width
 const SwFmtFrmSize &rFrmSize = pFmt->GetFrmSize();
 sal_uInt16 nDir =
 ((SvxFrameDirectionItem&)pFmt->GetFmtAttr( RES_FRAMEDIR )).GetValue();
@@ -146,16 +146,16 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm 
*pAnch ) :
 // insert columns, if necessary
 InsertColumns();
 
-//Erst das Init, dann den Inhalt, denn zum Inhalt koennen  widerum
-//Objekte/Rahmen gehoeren die dann angemeldet werden.
+// First the Init, then the Content:
+// This is due to the fact that the Content may have Objects/Frames,
+// which are then registered
 InitDrawObj( sal_False );
 
 Chain( pAnch );
 
 InsertCnt();
 
-//Und erstmal in den Wald stellen die Kiste, damit bei neuen Dokument nicht
-//unnoetig viel formatiert wird.
+// Put it somewhere outside so that out document is not formatted 
unnecessarily often
 Frm().Pos().setX(FAR_AWAY);
 Frm().Pos().setY(FAR_AWAY);
 }
@@ -198,7 +198,7 @@ void SwFlyFrm::InsertCnt()
 const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
 OSL_ENSURE( rCntnt.GetCntntIdx(), ":-( no content prepared." );
 sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
-// Lower() bedeutet SwColumnFrm, eingefuegt werden muss der Inhalt 
dann in den (Column)BodyFrm
+// Lower() means SwColumnFrm; the Content then needs to be instered 
into the (Column)BodyFrm
 ::_InsertCnt( Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)Lower())->Lower() 
: (SwLayoutFrm*)this,
   GetFmt()->GetDoc(), nIndex );
 
@@ -227,13 +227,11 @@ void SwFlyFrm::InsertCnt()
 const SwFmtCol &rCol = GetFmt()->GetCol();
 if ( rCol.GetNumCols() > 1 )
 {
-//PrtArea ersteinmal so gross wie der Frm, damit die Spalten
-//vernuenftig eingesetzt werden koennen; das schaukelt sich dann
-//schon zurecht.
+// Start off PrtArea to be as large as Frm, so that we can put in the 
columns
+// properly. It'll adjust later on.
 Prt().Width( Frm().Width() );
 Prt().Height( Frm().Height() );
-const SwFmtCol aOld; //ChgColumns() verlaesst sich darauf, dass auch 
ein
- //Old-Wert hereingereicht wird.
+const SwFmtCol aOld; // ChgColumns() also needs an old

[Libreoffice-commits] core.git: sc/source sw/source toolkit/source vcl/source winaccessibility/source xmloff/source

2013-12-12 Thread Takeshi Abe
 sc/source/ui/Accessibility/AccessibleDocument.cxx |2 --
 sw/source/core/access/accframebase.cxx|1 -
 sw/source/core/access/accmap.cxx  |1 -
 sw/source/core/access/accpara.cxx |4 
 sw/source/core/access/acctable.cxx|1 -
 toolkit/source/awt/vclxmenu.cxx   |2 --
 vcl/source/filter/wmf/winmtf.cxx  |1 -
 vcl/source/gdi/impimagetree.cxx   |1 -
 winaccessibility/source/service/AccObject.cxx |1 -
 xmloff/source/style/impastpl.hxx  |1 -
 10 files changed, 15 deletions(-)

New commits:
commit ed2238156618b5eae5a7e3b040dd0973793eace0
Author: Takeshi Abe 
Date:   Fri Dec 13 12:50:42 2013 +0900

Drop duplicate #include

Change-Id: I63612bc5bd4e13fcc5c4e57ac73bd9c7bbf4f0e6

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 4c10181..e722ce3 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -76,8 +76,6 @@
 #include 
 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/core/access/accframebase.cxx 
b/sw/source/core/access/accframebase.cxx
index 8697c57..b22c899 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -35,7 +35,6 @@
 #include "accframebase.hxx"
 
 #include 
-#include "fesh.hxx"
 #include 
 #include 
 #include 
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index ce9d912..7deaeff 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -53,7 +53,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 3dfd7f0..a70569f 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -83,7 +83,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -94,15 +93,12 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include "../../ui/inc/fldmgr.hxx"
 #include "fldbas.hxx"  // SwField
 
-#include 
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 using namespace ::com::sun::star::container;
diff --git a/sw/source/core/access/acctable.cxx 
b/sw/source/core/access/acctable.cxx
index 9233ee9..49ffcdb 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -44,7 +44,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index ea5a018..48d52dc 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -31,8 +31,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index dd3b3b6..bfd30eb 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 1c67667..708f3c2 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -45,7 +45,6 @@
 #include "vcl/settings.hxx"
 #include "vcl/svapp.hxx"
 #include "impimagetree.hxx"
-#include 
 
 namespace {
 
diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index b14d314..4bc03c4 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 4293372..a2f06f2 100644
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -32,7 +32,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 class SvXMLAutoStylePoolP;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-05 Thread Tor Lillqvist
 sc/source/ui/Accessibility/AccessibleCell.cxx   |4 ++--
 sw/source/core/access/acccell.cxx   |5 +++--
 winaccessibility/source/UAccCOM/AccTextBase.cxx |8 
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit a0a903892ca93615c1460cebbfbac57233f2
Author: Tor Lillqvist 
Date:   Thu Dec 5 18:06:04 2013 +0200

Avoid multiple definitions of two lovingly copy-pasted functions

Multple external definitions of a symbol causes problems when linking
statically, as for Android. Just make the functions static for now, as they
are only used locally in the files where defined anyway.

Change-Id: I8ddbaf01497c171bed4e15f6183ba43461c672d1

diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx 
b/sc/source/ui/Accessibility/AccessibleCell.cxx
index efd178b..74c9d72 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -470,7 +470,7 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
 }
 }
 
-OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString 
replaceStr)
+static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, 
OUString replaceStr)
 {
 int iReplace = -1;
 iReplace = oldOUString.lastIndexOf(replacedChar);
@@ -485,7 +485,7 @@ OUString ReplaceOneChar(OUString oldOUString, OUString 
replacedChar, OUString re
 return oldOUString;
 }
 
-OUString ReplaceFourChar(OUString oldOUString)
+static OUString ReplaceFourChar(OUString oldOUString)
 {
 oldOUString = ReplaceOneChar(oldOUString, "\\", "");
 oldOUString = ReplaceOneChar(oldOUString, ";", "\\;");
diff --git a/sw/source/core/access/acccell.cxx 
b/sw/source/core/access/acccell.cxx
index 97e1460..137fa4c 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -399,7 +399,7 @@ uno::Any SwAccessibleCell::getMinimumValue(  )
 return aAny;
 }
 
-OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString 
replaceStr)
+static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, 
OUString replaceStr)
 {
 int iReplace = -1;
 iReplace = oldOUString.lastIndexOf(replacedChar);
@@ -413,7 +413,8 @@ OUString ReplaceOneChar(OUString oldOUString, OUString 
replacedChar, OUString re
 }
 return oldOUString;
 }
-OUString ReplaceFourChar(OUString oldOUString)
+
+static OUString ReplaceFourChar(OUString oldOUString)
 {
 oldOUString = ReplaceOneChar(oldOUString,OUString("\\"),OUString(""));
 oldOUString = ReplaceOneChar(oldOUString,OUString(";"),OUString("\\;"));
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx 
b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index e63afe4..756bce9 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -39,7 +39,7 @@ using namespace rtl;
 // Construction/Destruction
 //
 
-OUString ReplaceFourChar(OUString oldOUString);
+static OUString ReplaceFourChar(OUString oldOUString);
 
 CAccTextBase::CAccTextBase()
 {}
@@ -962,7 +962,7 @@ STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface)
 LEAVE_PROTECTED_BLOCK
 }
 
-OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString 
replaceStr)
+static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, 
OUString replaceStr)
 {
 int iReplace = -1;
 iReplace = oldOUString.lastIndexOf(replacedChar);
@@ -975,9 +975,9 @@ OUString ReplaceOneChar(OUString oldOUString, OUString 
replacedChar, OUString re
 }
 }
 return oldOUString;
-
 }
-OUString ReplaceFourChar(OUString oldOUString)
+
+static OUString ReplaceFourChar(OUString oldOUString)
 {
 oldOUString = ReplaceOneChar(oldOUString, OUString("\\"), 
OUString(""));
 oldOUString = ReplaceOneChar(oldOUString, OUString(";"), OUString("\\;"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-12 Thread Armin Le Grand
 sc/source/ui/drawfunc/fudraw.cxx |5 +
 sw/source/ui/docvw/edtwin.cxx|  102 ++-
 2 files changed, 86 insertions(+), 21 deletions(-)

New commits:
commit 2d64de59c2109e378e4d38d6cad2510226c05435
Author: Armin Le Grand 
Date:   Fri Oct 19 14:09:57 2012 +

Resolves: #i121236# Added support for fast move of objects with cursor keys

(holding shift) for Writer and Calc (was alraedy in Draw/Impress)

(cherry picked from commit d794e5f9ebb756958725183bbfcc88f457d1bc1d)

Conflicts:
sw/source/ui/docvw/edtwin.cxx

Change-Id: I74e0ba40fa0900915adc84f722105e7fdddb0a19

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 64e8c89..6f73d8a 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -461,6 +461,11 @@ sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt)
 nX *= aLogicSizeOnePixel.Width();
 nY *= aLogicSizeOnePixel.Height();
 }
+else if(rKEvt.GetKeyCode().IsShift()) // #i121236# Support 
for shift key in calc
+{
+nX *= 1000;
+nY *= 1000;
+}
 else
 {
 // old, fixed move distance
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index f0b1951..6105a56 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -982,6 +982,12 @@ void SwEditWin::FlushInBuffer()
 #define MOVE_RIGHT_SMALL6
 #define MOVE_DOWN_SMALL 7
 
+// #i121236# Support for shift key in writer
+#define MOVE_LEFT_HUGE  8
+#define MOVE_UP_HUGE9
+#define MOVE_RIGHT_HUGE 10
+#define MOVE_DOWN_HUGE  11
+
 void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
 {
 SwWrtShell &rSh = m_rView.GetWrtShell();
@@ -1001,11 +1007,18 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool 
bWeb )
 rSh.GetFlyFrmAttr( aSet );
 RndStdIds eAnchorId = 
((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
 Size aSnap;
+bool bHuge(MOVE_LEFT_HUGE == nDir ||
+MOVE_UP_HUGE == nDir ||
+MOVE_RIGHT_HUGE == nDir ||
+MOVE_DOWN_HUGE == nDir);
+
 if(MOVE_LEFT_SMALL == nDir ||
 MOVE_UP_SMALL == nDir ||
 MOVE_RIGHT_SMALL == nDir ||
 MOVE_DOWN_SMALL == nDir )
+{
 aSnap = PixelToLogic(Size(1,1));
+}
 else
 {
 aSnap = rSh.GetViewOptions()->GetSnapSize();
@@ -1017,6 +1030,12 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb 
)
 aSnap.Height() = std::max( (sal_uLong)1, 
(sal_uLong)aSnap.Height() / nDiv );
 }
 
+if(bHuge)
+{
+// #i121236# 567twips == 1cm, but just take three times the normal 
snap
+aSnap = Size(aSnap.Width() * 3, aSnap.Height() * 3);
+}
+
 SwRect aBoundRect;
 Point aRefPoint;
 // adjustment for allowing vertical position
@@ -1039,15 +1058,31 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool 
bWeb )
 switch ( nDir )
 {
 case MOVE_LEFT_BIG:
-case MOVE_LEFT_SMALL: aTmp.Left( aTmp.Left() - nLeft ); break;
+case MOVE_LEFT_HUGE:
+case MOVE_LEFT_SMALL: aTmp.Left( aTmp.Left() - nLeft );
+break;
+
 case MOVE_UP_BIG:
-case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp ); break;
-case MOVE_RIGHT_SMALL: if( aTmp.Width() < aSnap.Width() + MINFLY ) 
break;
-nRight = aSnap.Width(); // no break
-case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); break;
-case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY 
) break;
-nDown = aSnap.Height(); // no break
-case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break;
+case MOVE_UP_HUGE:
+case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp );
+break;
+
+case MOVE_RIGHT_SMALL:
+if( aTmp.Width() < aSnap.Width() + MINFLY )
+break;
+nRight = aSnap.Width(); // no break
+case MOVE_RIGHT_HUGE:
+case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight );
+break;
+
+case MOVE_DOWN_SMALL:
+if( aTmp.Height() < aSnap.Height() + MINFLY )
+break;
+nDown = aSnap.Height(); // no break
+case MOVE_DOWN_HUGE:
+case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown );
+break;
+
 default: OSL_ENSURE(true, "ChangeFly: Unknown direction." );
 }
 bool bSet = false;
@@ -1151,33 +1186,38 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
 
 long nX = 0;
 long nY =

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

2013-04-19 Thread Eike Rathke
 sc/source/core/tool/autoform.cxx |5 -
 sw/source/core/doc/tblafmt.cxx   |5 +
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 8a6a940a469bac1c274b988dce713181f044d6c4
Author: Eike Rathke 
Date:   Fri Apr 19 15:06:38 2013 +0200

just added a big red notice

Change-Id: I095a824c18a4ea61663e2706daa6616d60aaeb34

diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index d3e036e..18b5061 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -36,7 +36,10 @@
 #include "globstr.hrc"
 #include "document.hxx"
 
-//
+/*
+ * XXX: BIG RED NOTICE! Changes MUST be binary file format compatible and MUST
+ * be synchronized with Writer's SwTableAutoFmtTbl 
sw/source/core/doc/tblafmt.cxx
+ */
 
 const sal_Char *linker_dummy = "";
 
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 1a98459..2031563 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -42,6 +42,11 @@
 #include 
 #include 
 
+/*
+ * XXX: BIG RED NOTICE! Changes MUST be binary file format compatible and MUST
+ * be synchronized with Calc's ScAutoFormat sc/source/core/tool/autoform.cxx
+ */
+
 using ::editeng::SvxBorderLine;
 
 // until SO5PF
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-20 Thread gerhard oettl
 sc/source/core/data/table4.cxx  |  122 
 sw/source/core/text/porglue.cxx |   48 +++
 2 files changed, 83 insertions(+), 87 deletions(-)

New commits:
commit b4966ea69ff0ad6944bd16d8a09ecb27a1704c10
Author: gerhard oettl 
Date:   Tue Mar 19 16:49:00 2013 +0100

fdo#39468: Translated German comments

Change-Id: I840ab979486a8cdfed4b19f4966eef1b9f287a5b
Reviewed-on: https://gerrit.libreoffice.org/2847
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 72a018b..6970b54 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -185,7 +185,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 rListData = NULL;
 rCmd = FILL_SIMPLE;
 if ( (nScFillModeMouseModifier & KEY_MOD1) )
-return ;// Ctrl-Taste: Copy
+return ;// Ctrl-key: Copy
 
 SCCOL nAddX;
 SCROW nAddY;
@@ -286,7 +286,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 }
 }
 }
-else// einzelnes Datum -> Tage 
hochzaehlen
+else// single date -> increment by days
 {
 rCmd = FILL_DATE;
 rDateCmd = FILL_DAY;
@@ -428,7 +428,7 @@ void ScTable::FillFormula(sal_uLong& /* nFormulaCounter */, 
bool /* bFirst */, S
   SCCOL nDestCol, SCROW nDestRow, bool bLast )
 {
 
-pDocument->SetNoListening( true );  // noch falsche Referenzen
+pDocument->SetNoListening( true );  // still the wrong reference
 ScAddress aAddr( nDestCol, nDestRow, nTab );
 ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr 
);
 aCol[nDestCol].Insert(nDestRow, pDestCell);
@@ -475,7 +475,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 return;
 
 //
-//  Richtung auswerten
+//  Detect direction
 //
 
 bool bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
@@ -483,7 +483,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 
 sal_uLong nCol = 0;
 sal_uLong nRow = 0;
-sal_uLong& rInner = bVertical ? nRow : nCol;// Schleifenvariablen
+sal_uLong& rInner = bVertical ? nRow : nCol;// loop variables
 sal_uLong& rOuter = bVertical ? nCol : nRow;
 sal_uLong nOStart;
 sal_uLong nOEnd;
@@ -553,15 +553,15 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 nProgress = pProgress->GetState();
 
 //
-//  ausfuehren
+//  execute
 //
 
 sal_uLong nActFormCnt = 0;
 for (rOuter = nOStart; rOuter <= nOEnd; rOuter++)
 {
-sal_uLong nMaxFormCnt = 0;  // fuer Formeln
+sal_uLong nMaxFormCnt = 0;  // for formulas
 
-//  Attributierung uebertragen
+//  transfer attributes
 
 const ScPatternAttr* pSrcPattern = NULL;
 const ScStyleSheet* pStyleSheet = NULL;
@@ -582,7 +582,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 pSrcPattern = 
aCol[nAtSrc].GetPattern(static_cast(nRow));
 bGetPattern = false;
 pStyleSheet = pSrcPattern->GetStyleSheet();
-//  Merge/Mergeflag nicht uebernehmen,
+//  do not transfer ATTR_MERGE / ATTR_MERGE_FLAG
 const SfxItemSet& rSet = pSrcPattern->GetItemSet();
 if ( rSet.GetItemState(ATTR_MERGE, false) == SFX_ITEM_SET
 || rSet.GetItemState(ATTR_MERGE_FLAG, false) == 
SFX_ITEM_SET )
@@ -601,10 +601,10 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 
 if ( bVertical && nISrcStart == nISrcEnd && !bHasFiltered )
 {
-//  Attribute komplett am Stueck setzen
+//  set all attributes at once (en bloc)
 if (pNewPattern || pSrcPattern != 
pDocument->GetDefPattern())
 {
-//  Default steht schon da (DeleteArea)
+//  Default is already present (DeleteArea)
 SCROW nY1 = static_cast(Min( nIStart, nIEnd ));
 SCROW nY2 = static_cast(Max( nIStart, nIEnd ));
 if ( pStyleSheet )
@@ -625,7 +625,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 }
 
 
-break;  // Schleife abbrechen
+break;
 }
 
 if ( bHasFiltered )
@@ -634,12 +634,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, 

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

2013-02-18 Thread Samuel Mehrbrodt
 sc/source/ui/src/hdrcont.src  |   12 ++--
 sw/source/ui/lingu/olmenu.src |   14 ++
 2 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 30be3db6ab81d7e58507bd61b2040e4e0c296852
Author: Samuel Mehrbrodt 
Date:   Sat Feb 2 12:59:06 2013 +0100

Better wording for several Actions

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

diff --git a/sc/source/ui/src/hdrcont.src b/sc/source/ui/src/hdrcont.src
index 6447271..f1e5972 100644
--- a/sc/source/ui/src/hdrcont.src
+++ b/sc/source/ui/src/hdrcont.src
@@ -77,19 +77,19 @@ Menu RID_POPUP_ROWHEADER
 {
 Identifier = FID_INS_ROW ;
 HelpId = CMD_FID_INS_ROW ;
-Text [ en-US ] = "~Insert Rows" ;
+Text [ en-US ] = "~Insert Rows Above" ;
 };
 MenuItem
 {
 Identifier = SID_DEL_ROWS ;
 HelpId = CMD_SID_DEL_ROWS ;
-Text [ en-US ] = "~Delete Rows" ;
+Text [ en-US ] = "~Delete Selected Rows" ;
 };
 MenuItem
 {
 Identifier = SID_DELETE ;
 HelpId = CMD_SID_DELETE ;
-Text [ en-US ] = "De~lete Contents..." ;
+Text [ en-US ] = "De~lete Row Contents..." ;
 };
  //--
 MenuItem { Separator = TRUE ; };
@@ -148,19 +148,19 @@ Menu RID_POPUP_COLHEADER
 {
 Identifier = FID_INS_COLUMN ;
 HelpId = CMD_FID_INS_COLUMN ;
-Text [ en-US ] = "~Insert Columns" ;
+Text [ en-US ] = "~Insert Columns Left" ;
 };
 MenuItem
 {
 Identifier = SID_DEL_COLS ;
 HelpId = CMD_SID_DEL_COLS ;
-Text [ en-US ] = "~Delete Columns" ;
+Text [ en-US ] = "~Delete Selected Columns" ;
 };
 MenuItem
 {
 Identifier = SID_DELETE ;
 HelpId = CMD_SID_DELETE ;
-Text [ en-US ] = "D~elete Contents..." ;
+Text [ en-US ] = "D~elete Column Contents..." ;
 };
  //--
 MenuItem { Separator = TRUE ; };
diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index c5da211..5512bf0 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -40,13 +40,13 @@ Menu MN_SPELL_POPUP
 SubMenu = Menu
 {
 };
-Text [ en-US ] = "~Add to dictionary" ;
+Text [ en-US ] = "~Add to Dictionary" ;
 };
 MenuItem
 {
 Identifier = MN_ADD_TO_DIC_SINGLE ;
 HelpID = HID_LINGU_ADD_WORD ;
-Text [ en-US ] = "~Add to dictionary" ;
+Text [ en-US ] = "~Add to Dictionary" ;
 };
 MenuItem
 {
@@ -80,16 +80,6 @@ Menu MN_SPELL_POPUP
 };
 Text [ en-US ] = "Set Language for Paragraph" ;
 };
-/*
-   MenuItem
-{
-Identifier = MN_SET_LANGUAGE_ALL_TEXT ;
-SubMenu = Menu
-{
-};
-Text [ en-US ] = "Set Language for all Text" ;
-};
-*/
 };
 };
 String STR_WORD
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits