summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx6
-rw-r--r--sw/source/uibase/uiview/view.cxx3
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx3
4 files changed, 5 insertions, 9 deletions
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index 31adc5ac0acf..60aba4106f9d 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -360,9 +360,9 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- bool bOnlyHardAttr = true;
if( pDrawView->AreObjectsMarked() )
{
+ bool bOnlyHardAttr = true;
pItemSet_TxtAttr = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
//remove attributes defining the type/data of custom shapes
pItemSet_TxtAttr->ClearItem(SDRATTR_CUSTOMSHAPE_ENGINE);
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 4ca5825d6966..2cc610fde482 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1599,16 +1599,14 @@ void SwPagePreview::ScrollViewSzChg()
const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
const Size& rPreviewSize =
GetViewShell()->PagePreviewLayout()->GetPreviewDocSize();
- long nVisWidth = 0;
- long nThumb = 0;
Range aRange(0,0);
if(rDocRect.GetWidth() < rPreviewSize.Width())
{
bShowHScrollbar = true;
- nVisWidth = rDocRect.GetWidth();
- nThumb = rDocRect.Left();
+ long nVisWidth = rDocRect.GetWidth();
+ long nThumb = rDocRect.Left();
aRange = Range(0, rPreviewSize.Width());
pHScrollbar->SetRange( aRange );
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 9838bc9f3c48..f6a8512e758b 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -270,10 +270,9 @@ void SwView::SelectShell()
if ( nId )
pBarCfg->SetTopToolbar( m_nSelectionType, nId );
- SfxShell *pSfxShell;
for ( sal_uInt16 i = 0; true; ++i )
{
- pSfxShell = rDispatcher.GetShell( i );
+ SfxShell *pSfxShell = rDispatcher.GetShell( i );
if ( pSfxShell->ISA( SwBaseShell )
|| pSfxShell->ISA( SwDrawTextShell )
|| pSfxShell->ISA( svx::ExtrusionBar )
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 0d75a1a149eb..76b386a72096 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1838,13 +1838,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// The entire frame width - The difference is twice the distance to the edge.
const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width();
int nWidth = 0,
- nStart = 0,
nEnd = 0;
aRectangle.Left() = 0;
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const SwColumn* pCol = &rCols[i];
- nStart = pCol->GetLeft() + nWidth;
+ const int nStart = pCol->GetLeft() + nWidth;
if(i == nNum - 2)
aRectangle.Left() = nStart;
nWidth += pCols->CalcColWidth( i, nTotalWidth );