summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2024-11-06 12:35:36 +0100
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2024-11-08 10:16:58 +0100
commit0b7d01a1a20b291e5c0ca3082c7714a565381f4d (patch)
tree6e2b5dded0a7260243eaa2caf8dccdbc0b3e570e
parent1e99b33b9ab77874a3483ce6e192a58842794f2a (diff)
Related tdf#74386 - Improvements for text boundaries options
* Default is Crop Marks now * Settings are persistent Change-Id: If5304c874706345fa943a106044155152c86bc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176131 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs8
-rw-r--r--sw/inc/viewopt.hxx2
-rw-r--r--sw/source/uibase/config/cfgitems.cxx2
-rw-r--r--sw/source/uibase/config/usrpref.cxx7
-rw-r--r--sw/source/uibase/uno/unomod.cxx6
5 files changed, 20 insertions, 5 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index b21efe63c7f1..d1cd0b52d309 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -900,6 +900,14 @@
</constraints>
<value>1</value>
</prop>
+ <prop oor:name="TextBoundaries" oor:type="xs:boolean" oor:nillable="false">
+ <!-- UIHints: Not accessible via user interface -->
+ <info>
+ <desc>Shows text boundaries as full frame (true) or crop marks (false), if enabled.</desc>
+ <label>Show text boundaries as full frame or crop marks</label>
+ </info>
+ <value>false</value>
+ </prop>
</group>
<group oor:name="Zoom">
<info>
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 56ef7ff19900..1aedb38d243b 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -103,7 +103,7 @@ struct ViewOptFlags1
, bShowOutlineContentVisibilityButton(false)
, bShowChangesInMargin(false)
, bShowChangesInMargin2(false)
- , bTextBoundariesFull(true)
+ , bTextBoundariesFull(false)
{}
bool operator==(const ViewOptFlags1& rOther) const
diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx
index 27a3690f9b99..5018e1d0fbfa 100644
--- a/sw/source/uibase/config/cfgitems.cxx
+++ b/sw/source/uibase/config/cfgitems.cxx
@@ -34,7 +34,7 @@ SwDocDisplayItem::SwDocDisplayItem() :
m_bCharHiddenText =
m_bBookmarks =
m_bManualBreak = true;
- m_bTextBoundariesFull = true;
+ m_bTextBoundariesFull = false; // default is crop
m_xDefaultAnchor = 1; //FLY_TO_CHAR
};
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index ea59c279b37e..795a678412e1 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -125,7 +125,8 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() const
"Display/DefaultAnchor", // 25
"Zoom/DefaultZoom", // 26
"Zoom/ZoomType", // 27
- "Zoom/ZoomValue" //28
+ "Zoom/ZoomValue", //28
+ "Display/TextBoundaries" // 29
};
#if defined(__GNUC__) && !defined(__clang__)
// clang 8.0.0 says strcmp isn't constexpr
@@ -204,6 +205,7 @@ void SwContentViewConfig::ImplCommit()
case 26: bVal = m_rParent.IsDefaultZoom(); break;// "Zoom/DefaultZoom"
case 27:pValues[nProp] <<= static_cast<sal_Int32>(m_rParent.GetDefaultZoomType()); break; // "Zoom/ZoomType"
case 28: pValues[nProp] <<= static_cast<sal_Int32>(m_rParent.GetDefaultZoomValue()); break; // "Zoom/ZoomValue"
+ case 29: bVal = m_rParent.IsTextBoundariesFull(); break; // "Display/TextBoundaries"
}
if ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor) &&
(nProp != g_ZoomType) && (nProp != g_ZoomValue))
@@ -280,7 +282,8 @@ void SwContentViewConfig::Load()
pValues[nProp] >>= nSet;
m_rParent.SetDefaultZoomValue(static_cast<sal_uInt16>(nSet), true);
}
- break; //"Zoom/ZoomValue"
+ break; //"Zoom/ZoomValue" // 28
+ case 29: m_rParent.SetTextBoundariesFull(bSet); break; //"Display/TextBoundaries" // 29
}
}
}
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index f8305d3c1682..2414fbfe44e1 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -96,7 +96,8 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_BOOKMARKS,
HANDLE_VIEWSET_SHOW_OUTLINECONTENTVISIBILITYBUTTON,
HANDLE_VIEWSET_TREAT_SUB_OUTLINE_LEVELS_AS_CONTENT,
- HANDLE_VIEWSET_CHANGES_IN_MARGIN
+ HANDLE_VIEWSET_CHANGES_IN_MARGIN,
+ HANDLE_VIEWSET_TEXTBOUNDARIES
};
enum SwPrintSettingsPropertyHandles
@@ -174,6 +175,7 @@ static rtl::Reference<ChainablePropertySetInfo> lcl_createViewSettingsInfo()
{ u"VerticalRulerMetric"_ustr, HANDLE_VIEWSET_VERT_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
{ u"ZoomType"_ustr, HANDLE_VIEWSET_ZOOM_TYPE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE},
{ u"ZoomValue"_ustr, HANDLE_VIEWSET_ZOOM , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE},
+ { u"TextBoundaries"_ustr, HANDLE_VIEWSET_TEXTBOUNDARIES , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE},
{ OUString(), 0, css::uno::Type(), 0 }
};
return new ChainablePropertySetInfo ( aViewSettingsMap_Impl );
@@ -749,6 +751,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
}
}
break;
+ case HANDLE_VIEWSET_TEXTBOUNDARIES: mpViewOption->SetTextBoundariesFull(*o3tl::doAccess<bool>(rValue)); break;
default:
throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
}
@@ -929,6 +932,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
bBool = false;
}
break;
+ case HANDLE_VIEWSET_TEXTBOUNDARIES : bBoolVal = mpConstViewOption->IsTextBoundariesFull(); break;
default: OSL_FAIL("there is no such ID!");
}
if( bBool )